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!)
A345681 a(0) = 0; for n >= 1, a(n) = A004185(a(n-1)+n). 1
0, 1, 3, 6, 1, 6, 12, 19, 27, 36, 46, 57, 69, 28, 24, 39, 55, 27, 45, 46, 66, 78, 1, 24, 48, 37, 36, 36, 46, 57, 78, 19, 15, 48, 28, 36, 27, 46, 48, 78, 118, 159, 12, 55, 99, 144, 19, 66, 114, 136, 168, 129, 118, 117, 117, 127, 138, 159, 127, 168 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(9*k+0 or 8) == 0 (mod 9);
a(9*k+1 or 4 or 7) == 1 (mod 9);
a(9*k+2 or 6) == 3 (mod 9);
a(9*k+3 or 5) == 6 (mod 9).
EXAMPLE
a(4) = A004185(6+4) = 1; a(13) = A004185(69+13) = 28.
MATHEMATICA
a[0] := 0;
a[n_] := FromDigits[Sort[DeleteCases[IntegerDigits[a[n - 1] + n], 0]]];
Table[a[n], {n, 0, 59}] (* Robert P. P. McKone, Aug 16 2021 *)
PROG
(Python)
def A004185(n): return int("".join(sorted(str(n))).strip('0'))
def aupton(nn):
alst = [0]
for n in range(1, nn+1): alst.append(A004185(alst[-1]+n))
return alst
print(aupton(100)) # Michael S. Branicky, Jun 22 2021
(PARI) f(n) = fromdigits(vecsort(digits(n))); \\ A004185
a(n) = if (n==0, 0, f(a(n-1)+n)); \\ Michel Marcus, Jun 26 2021
(PARI) f(n) = fromdigits(vecsort(digits(n))); \\ A004185
lista(nn) = {my(v=vector(nn)); v[1] = 1; for (n=2, nn, v[n] = f(v[n-1]+n); ); concat(0, v); } \\ Michel Marcus, Jun 26 2021
CROSSREFS
Sequence in context: A331514 A091068 A065233 * A243658 A072452 A155830
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Jun 22 2021
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 April 19 08:08 EDT 2024. Contains 371782 sequences. (Running on oeis4.)