Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A370369 a(n) = n! + Sum_{k=1..n-1} (n-k)*k! = n! + A014145(n-1); for n >= 2, number of m such that any two consecutive digits of the base-n expansion of m differ by 1 after arranging the digits in decreasing order. 1
1, 3, 10, 37, 166, 919, 6112, 47305, 416098, 4091131, 44417044, 527456557, 6798432070, 94499679583, 1408924024696, 22425642181009, 379514672913322, 6804212771165635, 128827325000617948, 2568509718703606261, 53787877376348226574, 1180349932648067726887, 27086018941198865627200 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Given n, the largest such number is Sum_{i=0..n-1} i*n^i = A062813(n). If zero is excluded, the number of such k with d digits in base n, 1 <= d <= n, is (n+1-d)*d! - (d-1)!.
LINKS
EXAMPLE
a(3) = 10 because such numbers are 0_3, 1_3, 2_3, 10_3, 12_3, 21_3, 102_3, 120_3, 201_3 and 210_3.
a(10) = 4091131 is the number of terms of A215014.
PROG
(PARI) a(n) = n! + sum(k=1, n-1, (n-k)*k!)
CROSSREFS
Sequence in context: A250307 A363294 A289990 * A123636 A375655 A371901
KEYWORD
nonn,base,easy
AUTHOR
Jianing Song, Feb 16 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 11 09:20 EDT 2024. Contains 375814 sequences. (Running on oeis4.)