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

A055264 Possible values of A055263; numbers equal to 0, 1, 3 or 6 modulo 9.

Original entry on oeis.org

0, 1, 3, 6, 9, 10, 12, 15, 18, 19, 21, 24, 27, 28, 30, 33, 36, 37, 39, 42, 45, 46, 48, 51, 54, 55, 57, 60, 63, 64, 66, 69, 72, 73, 75, 78, 81, 82, 84, 87, 90, 91, 93, 96, 99, 100, 102, 105, 108, 109, 111, 114, 117, 118, 120, 123, 126, 127, 129, 132, 135, 136, 138, 141
Offset: 0

Views

Author

Henry Bottomley, May 08 2000

Keywords

Comments

The terms are the possible digit sums of a triangular number. - Amarnath Murthy, Jan 09 2002

References

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

Crossrefs

Cf. A055263.

Programs

  • Mathematica
    Select[Range[0,200],MemberQ[{0,1,3,6},Mod[#,9]]&] (* Harvey P. Dale, Apr 10 2014 *)
    #+{0,1,3,6}&/@(9*Range[0,20])//Flatten (* Harvey P. Dale, Jun 03 2019 *)
  • Python
    def A055264(n): return (0,1,3,6)[n&3]+9*(n>>2) # Chai Wah Wu, Jan 30 2023

Formula

a(n) = a(n-4) + 9 = 9*floor(n/4) + (n mod 4)*(1 + (n mod 4))/2.
G.f.: x*(1+2*x+3*x^2+3*x^3)/((1-x)^2*(1+x)*(1+x^2)). - R. J. Mathar, Sep 30 2008
E.g.f.: (3*cos(x) + (9*x - 3)*cosh(x) - sin(x) + (9*x - 4)*sinh(x))/4. - Stefano Spezia, Aug 07 2024

A131954 a(n) = sum of digits of (n! + a(n-1)), with a(1)=1.

Original entry on oeis.org

1, 3, 9, 6, 9, 18, 18, 18, 36, 36, 45, 36, 36, 54, 54, 72, 72, 63, 54, 63, 72, 81, 108, 90, 81, 90, 117, 99, 144, 126, 144, 117, 153, 153, 153, 180, 162, 117, 198, 207, 153, 198, 198, 234, 216, 225, 234, 243, 234, 225, 207, 288, 297, 279, 297, 351, 279, 306, 333, 297
Offset: 1

Views

Author

Keywords

Comments

If n >= 5, then 9 divides a(n); see comment in A004152. - Bernard Schott, Jun 27 2019

Examples

			a(4) = Sum_digits(4!+9) = 6.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,k,w; a:=0; for i from 1 by 1 to n do w:=0; k:=a+i!; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=w; print(a); od; end: P(100);
    # alternative:
    sd:= n-> convert(convert(n,base,10),`+`):
    A[1]:= 1:
    for n from 2 to 100 do A[n]:= sd(n!+A[n-1]) od:
    seq(A[i],i=1..100); # Robert Israel, Jun 26 2019
  • Mathematica
    s={1};Do[AppendTo[s,DigitSum[n!+s[[-1]]]],{n,2,60}];s (* James C. McMahon, Mar 03 2025 *)

Formula

a(n) = Sum_digits(n!+a(n-1)).

Extensions

Offset corrected by Robert Israel, Jun 26 2019

A131955 a(n) = sum of digits of (n!! + a(n-1)).

Original entry on oeis.org

1, 3, 6, 5, 2, 5, 2, 17, 17, 23, 14, 23, 23, 23, 23, 23, 41, 41, 41, 41, 41, 50, 41, 59, 68, 59, 68, 59, 68, 86, 86, 104, 95, 95, 104, 86, 104, 86, 122, 95, 104, 113, 149, 95, 140, 95, 131, 122, 149, 140, 140, 113, 185, 149, 185, 149, 176, 194, 176, 185, 194, 194, 203
Offset: 1

Views

Author

Keywords

Examples

			a(4) = Sum_digits(6+4!!) = Sum_digits(6+8) = Sum_digits(14) = 5.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,k,w; a:=0; for i from 1 by 1 to n do w:=0; k:=a+2^((1+2*i-cos(i*Pi))/4)*Pi^((cos(i*Pi)-1)/4)*GAMMA(1+1/2*i); while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=w; print(a); od; end: P(100);
    # alternative:
    A[1]:= 1:
    for n from 2 to 100 do
      A[n]:= convert(convert(doublefactorial(n)+A[n-1],base,10),`+`);
    od:
    seq(A[i],i=1..100); # Robert Israel, Oct 29 2020
  • Mathematica
    s={1};Do[AppendTo[s,DigitSum[n!!+s[[-1]]]],{n,2,63}];s (* James C. McMahon, Mar 03 2025 *)

Extensions

Offset corrected by Robert Israel, Oct 29 2020

A055262 n + sum of digits of a(n-1).

Original entry on oeis.org

0, 1, 3, 6, 10, 6, 12, 10, 9, 18, 19, 21, 15, 19, 24, 21, 19, 27, 27, 28, 30, 24, 28, 33, 30, 28, 36, 36, 37, 39, 42, 37, 42, 39, 46, 45, 45, 46, 48, 51, 46, 51, 48, 55, 54, 54, 55, 57, 60, 55, 60, 57, 64, 63, 63, 64, 66, 69, 73, 69, 75, 73, 72, 72, 73, 75, 78, 82, 78, 84, 82
Offset: 0

Views

Author

Henry Bottomley, May 08 2000

Keywords

Examples

			a(10)=19 because a(9)=18, 1+8=9 and 10+9=19
		

Crossrefs

Cf. A055263.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,Total[IntegerDigits[a]]+n+1}; Transpose[NestList[nxt,{0,0},70]][[2]] (* Harvey P. Dale, Jun 03 2015 *)

Formula

a(n) = n+A055263(n-1) =n+A007953(a(n-1))

A134804 Remainder of triangular number A000217(n) modulo 9.

Original entry on oeis.org

0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6, 3, 1, 0, 0, 1, 3, 6, 1, 6
Offset: 0

Views

Author

R. J. Mathar, Jan 28 2008

Keywords

Comments

Periodic with period 9 since A000217(n+9) = A000217(n)+9(n+5) .
From Jacobsthal numbers A001045, A156060 = 0,1,1,3,5,2,3,7,4,0,8, = b(n). a(n)=A156060(n)*A156060(n+1) mod 9. Same transform (a(n)*a(n+1) mod 9 or b(n)*b(n+1) mod 9) in A157742, A158012, A158068, A158090. - Paul Curtz, Mar 25 2009

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 3, 6, 1, 6, 3, 1, 0},105] (* Ray Chandler, Aug 26 2015 *)

Formula

a(n) = A010878(A000217(n)) = A010878(A055263(n)) = a(n-9).
O.g.f.: (-2x+2)/[3(x^2+x+1)]+(-3+3x^5)/(x^6+x^3+1)-7/[3(x-1)].

A140131 a(n) = a(n-1) + a(n-2) + digsum(a(n-1)) + digsum(a(n-2)), with a(0)=0 and a(1)=1.

Original entry on oeis.org

0, 1, 2, 6, 16, 35, 66, 121, 203, 333, 550, 902, 1473, 2401, 3896, 6330, 10264, 16619, 26919, 43588, 70562, 114198, 184804, 299051, 483906, 783013, 1266971, 2050038, 3317059, 5367143, 8684259, 14051473, 22735799, 36787341, 59523223, 96310634, 155833920, 252144622
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,t; t:=[0,1]; for i from 1 to n do t:=[op(t),t[-2]+t[-1]+convert(convert(t[-2],base,10),`+`)+convert(convert(t[-1],base,10),`+`)]; od; print(op(t)); end: P(34); # Paolo P. Lava, Jun 25 2024
  • Mathematica
    nxt[{a_,b_}]:=a+b+Total[IntegerDigits[a]]+Total[IntegerDigits[b]]; Transpose[NestList[{Last[#],nxt[#]}&,{0,1},40]][[1]] (* Harvey P. Dale, Oct 31 2011 *)

A140132 a(n) = Sum_digits{a(n-1)+a(n-2)+Sum_digits[a(n-1)]+Sum_digits[a(n-2)]}, with a(0)=0 and a(1)=1.

Original entry on oeis.org

0, 1, 2, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7, 8, 3, 4, 5, 9, 10, 11, 6, 7
Offset: 0

Views

Author

Keywords

Comments

After the first three terms the sequence is periodic: 6,7,8,3,4,5,9,10,11.

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,t; t:=[0,1]; for i from 1 to n do
    a:=t[-2]+t[-1]+convert(convert(t[-2],base,10),`+`)+convert(convert(t[-1],base,10),`+`);
    t:=[op(t),convert(convert(a,base,10),`+`)]; od; print(op(t)); end: P(93); # Paolo P. Lava, Jun 25 2024
Showing 1-7 of 7 results.