cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A016052 a(1) = 3; for n >= 1, a(n+1) = a(n) + sum of its digits.

Original entry on oeis.org

3, 6, 12, 15, 21, 24, 30, 33, 39, 51, 57, 69, 84, 96, 111, 114, 120, 123, 129, 141, 147, 159, 174, 186, 201, 204, 210, 213, 219, 231, 237, 249, 264, 276, 291, 303, 309, 321, 327, 339, 354, 366, 381, 393, 408, 420, 426, 438, 453, 465, 480, 492
Offset: 1

Views

Author

Keywords

Comments

Mod 9 this sequence is 3, 6, 3, 6, 3, 6, ... This shows that this sequence is disjoint from A004207. - N. J. A. Sloane, Oct 15 2013

References

  • D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately printed, 311 Devlali Camp, Devlali, India, 1963.
  • G. E. Stevens and L. G. Hunsberger, A Result and a Conjecture on Digit Sum Sequences, J. Recreational Math. 27, no. 4 (1995), pp. 285-288.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 34-35.

Crossrefs

Programs

  • Haskell
    a016052 n = a016052_list !! (n-1)
    a016052_list = iterate a062028 3  -- Reinhard Zumkeller, Oct 14 2013
    
  • Mathematica
    NestList[# + Total[IntegerDigits[#]] &, 3, 51] (* Jayanta Basu, Aug 11 2013 *)
    a[1] = 3; a[n_] := a[n] = a[n - 1] + Total@ IntegerDigits@ a[n - 1]; Array[a, 80] (* Robert G. Wilson v, Jun 27 2014 *)
  • PARI
    a_list(nn) = { my(f(n, i) = n + vecsum(digits(n)), S=vector(nn+1)); S[1]=3; for(k=2, #S, S[k] = fold(f, S[1..k-1])); S[2..#S] } \\ Satish Bysany, Mar 04 2017
    
  • Python
    from itertools import islice
    def A016052_gen(): # generator of terms
        yield (a:=3)
        while True: yield (a:=a+sum(map(int,str(a))))
    A016052_list = list(islice(A016052_gen(),20)) # Chai Wah Wu, Jun 16 2024

Formula

a(n) = A062028(a(n-1)) for n > 1. - Reinhard Zumkeller, Oct 14 2013
a(n) - a(n-1) = A084228(n+1). - Robert G. Wilson v, Jun 27 2014

A230287 First differences of A016052/3 (= A230286).

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 2, 4, 2, 4, 5, 4, 5, 1, 2, 1, 2, 4, 2, 4, 5, 4, 5, 1, 2, 1, 2, 4, 2, 4, 5, 4, 5, 4, 2, 4, 2, 4, 5, 4, 5, 4, 5, 4, 2, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 7, 5, 4, 5, 4, 5, 7, 8, 4, 5, 4, 5, 7, 8, 4, 5, 7, 5, 7, 5, 4, 5, 7, 8, 7, 2, 1, 2, 4, 2, 4, 5, 4, 5, 1, 2, 1, 2, 4, 2, 4, 5, 4, 5, 4
Offset: 1

Views

Author

Keywords

Comments

This sequence captures the essence of A016052.
Essentially the same as A084228/3.

Crossrefs

Programs

  • Haskell
    a230287 n = a230287_list !! (n-1)
    a230287_list = zipWith (-) (tail a230286_list) a230286_list

A084229 Let b(1)=1, b(2)=2, b(n) = sum of digits of b(1)+b(2)+b(3)+...+b(n-1), sequence gives values of n such that b(n)=3.

Original entry on oeis.org

3, 5, 7, 9, 17, 19, 27, 29, 87, 95, 97, 159, 591, 599, 601, 663, 1143, 4609, 4617, 4619, 4681, 5161, 8993, 13165, 38277, 38279, 38341, 38821, 42653, 46825, 75043, 79223, 327015, 327023, 327025, 327087, 327567, 331399, 335571, 363789, 367969, 642981, 647153, 2847029, 2847031, 2847093, 2847573
Offset: 1

Views

Author

Benoit Cloitre, Jun 21 2003

Keywords

Comments

The {b(n)} sequence is A084228. - N. J. A. Sloane, Jun 26 2014
Note that b(k)==0 (mod 3) for n>2.

Crossrefs

Programs

  • Mathematica
    k = 3; lst = {}; a = 3; While[k < 100000001, b = a + Total@ IntegerDigits@ a; If[b == a + 3, AppendTo[lst, k]; Print@ k]; a = b; k++]; lst (* Robert G. Wilson v, Jun 27 2014 *)
  • PARI
    upto(n)={my(L=List(), s=3, k=3); while(k<=n, my(t=sumdigits(s)); if(t==3, listput(L,k)); s+=t; k++); Vec(L)} \\ Andrew Howroyd, Oct 16 2024

Formula

Conjecture : a(n)/n^3 is bounded.

Extensions

a(23) onward from Robert G. Wilson v, Jun 27 2014
Showing 1-3 of 3 results.