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-6 of 6 results.

A055263 a(n) = Sum of digits of (n + a(n-1)).

Original entry on oeis.org

0, 1, 3, 6, 1, 6, 3, 1, 9, 9, 10, 3, 6, 10, 6, 3, 10, 9, 9, 10, 3, 6, 10, 6, 3, 10, 9, 9, 10, 12, 6, 10, 6, 12, 10, 9, 9, 10, 12, 6, 10, 6, 12, 10, 9, 9, 10, 12, 6, 10, 6, 12, 10, 9, 9, 10, 12, 15, 10, 15, 12, 10, 9, 9, 10, 12, 15, 10, 15, 12, 10, 9, 9, 10, 12, 15, 10, 15, 12, 10, 9, 9, 10
Offset: 0

Views

Author

Henry Bottomley, May 08 2000

Keywords

Comments

If n=0 or 8 mod 9, then a(n)=0 mod 9; if n=1, 4 or 7 mod 9, then a(n)=1 mod 9; if n=2 or 6 mod 9, then a(n)=3 mod 9; if n=3 or 5 mod 9, then a(n)=6 mod 9.

Examples

			a(13)=10 because a(12)=6, 13 + 6 = 19 and 1 + 9 = 10.
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,Total[IntegerDigits[n+a+1]]}; Transpose[NestList[nxt,{0,0},90]][[2]] (* Harvey P. Dale, Aug 11 2016 *)

Formula

a(n) = A007953(A055262(n)) = A007953(n + a(n-1)).

Extensions

More terms from Paolo P. Lava, Jul 31 2007

A062688 Smallest triangular number with digit sum n (or 0 if no such number exists).

Original entry on oeis.org

1, 0, 3, 0, 0, 6, 0, 0, 36, 28, 0, 66, 0, 0, 78, 0, 0, 378, 496, 0, 1596, 0, 0, 8385, 0, 0, 5778, 5995, 0, 8778, 0, 0, 47895, 0, 0, 67896, 58996, 0, 196878, 0, 0, 468996, 0, 0, 887778, 1788886, 0, 4896885, 0, 0, 5897895, 0, 0, 13999986, 15997996, 0, 38997696
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

From Jon E. Schoenfield, Dec 04 2021: (Start)
a(n) = 0 iff n == (2,4,5,7,8) mod 9.
Nonzero terms are not nondecreasing; e.g., a(9)=36 > a(10)=28.
(End)

Examples

			66 is the smallest triangular number with digit sum 12, so a(12)=66.
		

Crossrefs

Programs

  • Mathematica
    (With[{tbl={#,Total[IntegerDigits[#]]}&/@Accumulate[Range[9000]]},Table[SelectFirst[ tbl,#[[2]] ==n&],{n,60}]]/.Missing["NotFound"]->{0,0})[[;;,1]] (* Harvey P. Dale, Aug 21 2024 *)
  • PARI
    a(n) = if (vecsearch([2,4,5,7,8], n % 9), return (0)); my(k=1); while (sumdigits(k*(k+1)/2) != n, k++); k*(k+1)/2; \\ Michel Marcus, Dec 12 2021

A350667 Numbers congruent to 1, 3, and 8 modulo 9: positions of 1 in A159955.

Original entry on oeis.org

1, 3, 8, 10, 12, 17, 19, 21, 26, 28, 30, 35, 37, 39, 44, 46, 48, 53, 55, 57, 62, 64, 66, 71, 73, 75, 80, 82, 84, 89, 91, 93, 98, 100, 102, 107, 109, 111, 116, 118, 120, 125, 127, 129, 134, 136, 138, 143, 145, 147
Offset: 0

Views

Author

Wolfdieter Lang, Jan 29 2022

Keywords

Comments

This sequence, together with A350666 and A350668, gives a 3-set partition of the nonnegative integers.
This sequence {a(n)}A347834,%20that%20are%20modulo%206%20periodic%20with%20period%20length%203,%20namely%20%7BA347834(a(n),%20m)%20mod%206%7D">{n>=0}, gives the indices of the row sequences of array A = A347834, that are modulo 6 periodic with period length 3, namely {A347834(a(n), m) mod 6}{m>=0} = {repeat(1, 5, 3)}.

Examples

			Rows of array {A347834(a(n), m)}_{m>=0}, with modulo 6 congruence:
n = 0: row 1: {1, 5, 21, 85, 341, 1365, 5461, ...} mod 6 = {repeat(1, 5, 3)},
n = 1: row 3: {7, 29, 117, 469, 1877, 7509, ...} mod 6 = {repeat(1, 5, 3)},
...
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 150], MemberQ[{1, 3, 8}, Mod[#, 9]] &] (* Amiram Eldar, Jan 29 2022 *)

Formula

A159955(a(n)) = 1.
Trisection: a(3*k) = 1 + 9*k, a(3*k+1) = 3 + 9*k, and a(3*k+3) = 8 + 9*k, for k >= 0.
G.f.: (1 + 2*x + 5*x^2 + x^3)/((1 - x)*(1 - x^3)).
a(n) = 1 + 3*n - 2*sin(2*n*Pi/3)/sqrt(3). - Stefano Spezia, Jan 30 2022
a(n) = 1 + 3*n - S(n-1,-1), with S(-1, x) = 0, with the Chebyshev S polynomials from A049310. From the g.f., or from the previous formula (see also Spezia's formula in A350666).

A375241 Nontriangular numbers with digital root in {1, 3, 6, 9}.

Original entry on oeis.org

9, 12, 18, 19, 24, 27, 30, 33, 37, 39, 42, 46, 48, 51, 54, 57, 60, 63, 64, 69, 72, 73, 75, 81, 82, 84, 87, 90, 93, 96, 99, 100, 102, 108, 109, 111, 114, 117, 118, 123, 126, 127, 129, 132, 135, 138, 141, 144, 145, 147, 150, 154, 156, 159, 162, 163, 165, 168, 172
Offset: 1

Views

Author

Stefano Spezia, Aug 07 2024

Keywords

Comments

Except for 0, the triangular numbers (A000217) have digital root in {1, 3, 6, 9} (A055264), but the reverse is not always true since there are nontriangular numbers (A014132) with digital root in the same set.

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 190.

Crossrefs

Intersection of A014132 and A055264. Complement of A375242 in A014132.

Programs

  • Mathematica
    A010888[n_]:=If[n>0,n - 9*Floor[(n-1)/9],0]; Select[Range[0,200], !OddQ[Sqrt[1+8#]] && MemberQ[{1,3,6,9},A010888[#]] &]

A375242 Numbers with digital root in {2, 4, 5, 7, 8}.

Original entry on oeis.org

2, 4, 5, 7, 8, 11, 13, 14, 16, 17, 20, 22, 23, 25, 26, 29, 31, 32, 34, 35, 38, 40, 41, 43, 44, 47, 49, 50, 52, 53, 56, 58, 59, 61, 62, 65, 67, 68, 70, 71, 74, 76, 77, 79, 80, 83, 85, 86, 88, 89, 92, 94, 95, 97, 98, 101, 103, 104, 106, 107, 110, 112, 113, 115, 116
Offset: 1

Views

Author

Stefano Spezia, Aug 07 2024

Keywords

Comments

Also nontriangular numbers with digital root in {2, 4, 5, 7, 8}.

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 190.

Crossrefs

Complement of A055264. Complement of A375241 in A014132.
Cf. A010888.

Programs

  • Mathematica
    A010888[n_]:=If[n>0,n - 9*Floor[(n-1)/9],0]; Select[Range[0,130], MemberQ[{2,4,5,7,8},A010888[#]] &]
  • PARI
    list(lim)=my(v=List()); forstep(n=2,lim\1,[2, 1, 2, 1, 3], listput(v,n)); Vec(v) \\ Charles R Greathouse IV, Aug 07 2024
    
  • PARI
    is(n)=!setsearch([0,1,3,6],n%9) \\ Charles R Greathouse IV, Aug 07 2024

Formula

G.f.: x*(2 + 2x + x^2 + 2*x^3 + x^4 + x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) ~ 9*n/5.

A067181 Duplicate of A062688.

Original entry on oeis.org

0, 1, 0, 3, 0, 0, 6, 0, 0, 36, 28, 0, 66, 0, 0, 78, 0, 0, 378, 496, 0, 1596, 0, 0, 8385, 0, 0, 5778, 5995, 0, 8778, 0, 0, 47895, 0, 0, 67896, 58996, 0, 196878, 0, 0, 468996, 0, 0, 887778, 1788886, 0, 4896885, 0, 0, 5897895, 0, 0, 13999986, 15997996, 0, 38997696
Offset: 0

Views

Author

Amarnath Murthy, Jan 09 2002

Keywords

Crossrefs

Cf. A055264.

Formula

a(n) = A062688(n), n > 0. - R. J. Mathar, Sep 30 2008

Extensions

More terms from Sascha Kurz, Mar 23 2002
Showing 1-6 of 6 results.