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

A068127 Triangular numbers with sum of digits = 3.

Original entry on oeis.org

3, 21, 120, 210, 300, 10011, 20100, 2001000, 200010000, 20000100000, 2000001000000, 200000010000000, 20000000100000000, 2000000001000000000, 200000000010000000000, 20000000000100000000000, 2000000000001000000000000, 200000000000010000000000000, 20000000000000100000000000000
Offset: 1

Views

Author

Amarnath Murthy, Feb 21 2002

Keywords

Comments

The sequence is unbounded, as the (2*10^k)-th triangular number is a term.

Crossrefs

Programs

  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Total[IntegerDigits[tri, 10]] == 3, AppendTo[t, tri]], {n, 1000000}]; t (* T. D. Noe, Jun 05 2012 *)
    Select[Accumulate[Range[2*10^6]],Total[IntegerDigits[#]]==3&] (* Harvey P. Dale, Jun 22 2021 *)
    Sort @ Select[Plus @@@ (10^Select[Tuples[Range[0, 29], 3], Min[Differences[#]] >= 0 &]), IntegerQ[Sqrt[8*# + 1]] &] (* Amiram Eldar, May 19 2022 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    def istri(n): return (lambda x: x == isqrt(x)**2)(8*n+1)
    def agen(): yield from filter(istri, (10**i + 10**j + 10**k for i in count(0) for j in range(i+1) for k in range(j+1)))
    print(list(islice(agen(), 20))) # Michael S. Branicky, May 14 2022

Extensions

More terms from Sascha Kurz, Mar 06 2002
One additional term (a(12)) from Harvey P. Dale, May 14 2022
More terms and offset changed to 1 from Michael S. Branicky, May 14 2022

A145389 Digital roots of triangular numbers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 10 2008

Keywords

Comments

Decimal expansion of 45387733/3333333330. - Enrique Pérez Herrero, Nov 14 2021

Crossrefs

Programs

  • Mathematica
    digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&,n]; Table[If[n==0,0,digitalRoot[n(n+1)/2]], {n,0,100}] (* Vladimir Joseph Stephan Orlovsky, May 02 2011 *)
  • PARI
    a(n)=if(n, n=n*(n+1)/2%9; if(n, n, 9), 0) \\ Charles R Greathouse IV, Dec 19 2016
    
  • Python
    def A145389(n): return (9, 1, 3, 6, 1, 6, 3, 1, 9)[n%9] if n else 0 # Chai Wah Wu, Feb 09 2023

Formula

a(n) = A010888(A000217(n)).
Periodic sequence for n>0: a(n+9) = a(n);
a(A016777(n)) = 1; a(A007494(n)) <> 1;
a(A090570(n)) = A010888(A090570(n)).
a(n) = 1 + ((n^2 + n - 2)/2) mod 9. - Ant King, Apr 25 2009
G.f.: x(1 + 3x + 6x^2 + x^3 + 6x^4 + 3x^5 + x^6 + 9x^7 + 9x^8)/((1-x)(1 + x + x^2)(1 + x^3 + x^6)). - Ant King, Nov 16 2010

A050493 a(n) = sum of binary digits of n-th triangular number.

Original entry on oeis.org

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

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 27 1999

Keywords

Comments

See A211201 for smallest numbers m such that a(m) = n. - Reinhard Zumkeller, Feb 04 2013

Crossrefs

Programs

Formula

a(n) = Sum_{i=1..floor(log_b(c(n)))+1} (floor(c(n)/b^(i-1)) - floor(c(n)/b^i)*b), b=2, n >= 1, a(0)=0, c(n)=A000217(n).
a(n) = A000120(A000217(n)). - Reinhard Zumkeller, Feb 04 2013
a(n) = [x^(n*(n+1)/2)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018

A117511 Triangular numbers for which the sum of the digits equals the sum of the digits of the next triangular number.

Original entry on oeis.org

36, 153, 2556, 3240, 4851, 5778, 9045, 11628, 13041, 14535, 17766, 19503, 33930, 41328, 46665, 49455, 52326, 71253, 74691, 81810, 85491, 93096, 109278, 122265, 131328, 140715, 145530, 160461, 170820, 181503, 186966, 192510, 203841, 252405, 258840, 265356
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 26 2006

Keywords

Comments

Each term is divisible by 9.

Examples

			153 is in the sequence because (1) 153 is triangular number a(18), triangular number a(19)=171 and (2) 1+5+3=1+7+1.
		

Crossrefs

Programs

  • Mathematica
    Transpose[With[{c=Partition[Accumulate[Range[2000]],2,1]}, Select[c, Total[IntegerDigits[First[#]]]==Total[IntegerDigits[Last[#]]]&]]] [[1]] (* Harvey P. Dale, Oct 18 2011 *)
    (#(#+1))/2&/@(SequencePosition[Total[IntegerDigits[#]]&/@Accumulate[ Range[ 1000]],{x_,x_}][[All,1]]) (* Harvey P. Dale, Mar 02 2022 *)

Formula

s(a(n)) = s(a(n+1)), where s(n) is the sum of the digits of n.

Extensions

Corrected by Harvey P. Dale, Oct 18 2011

A383356 a(n) = index of the smallest nonagonal number having the same digital sum as the n-th triangular number.

Original entry on oeis.org

1, 6, 3, 1, 3, 6, 4, 2, 2, 4, 5, 12, 4, 3, 6, 4, 2, 2, 4, 6, 3, 4, 12, 6, 4, 2, 11, 4, 5, 12, 13, 12, 5, 13, 2, 11, 4, 5, 12, 4, 12, 5, 13, 11, 2, 4, 5, 12, 4, 12, 5, 13, 2, 11, 4, 23, 12, 4, 12, 5, 13, 11, 2, 4, 5, 3, 13, 12, 5, 13, 11, 11, 4, 23, 12, 13, 3, 5, 4, 2, 2, 4
Offset: 1

Views

Author

Claude H. R. Dequatre, Apr 24 2025

Keywords

Comments

From Robert Israel, Apr 24 2025: (Start)
If n == 0 or 8 (mod 9) then a(n) == 0 or 2 (mod 9).
If n == 1, 4 or 7 (mod 9) then a(n) == 1, 4 or 7 (mod 9).
If n == 2 or 6 (mod 9) then a(n) == 5 or 6 (mod 9).
If n == 3 or 5 (mod 9) then a(n) == 3 or 8 (mod 9). (End)

Examples

			For n = 2, the 2nd triangular number is (2^2+2)/2 = 3, its digital sum is 3 and the smallest nonagonal number having 3 as digital sum is (7*6^2 - 5*6)/2 = 111 whose index is 6, so a(2) = 6.
For n = 16, the 16-th triangular number is (16^2 +16)/2 = 136, its digital sum is 10 and the smallest nonagonal number having 10 as digital sum is (7*4^2 -5*4)/2 = 46 whose index is 4, so a(16) = 4.
		

Crossrefs

Programs

  • Maple
    ds:= n -> convert(convert(n,base,10),`+`):
    v:= 0: R:= NULL:
    for k from 1 to 200 do
       r:= ds(k*(k+1)/2);
       if assigned(W[r]) then R:= R,W[r]
       else do
         v:= v+1;
         s:= ds(v*(7*v-5)/2);
         if not assigned(W[s]) then W[s]:= v fi;
         if s = r then R:= R,v; break fi;
         od fi od:
    R; # Robert Israel, Apr 24 2025
  • PARI
    a(n) = my(s=sumdigits((n^2+n)/2)); k=1; while(sumdigits((7*k^2-5*k)/2)!=s, k++); k;
Showing 1-5 of 5 results.