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-10 of 17 results. Next

A353974 a(n) is the n-th partial sum of A056992.

Original entry on oeis.org

0, 1, 5, 14, 21, 28, 37, 41, 42, 51, 52, 56, 65, 72, 79, 88, 92, 93, 102, 103, 107, 116, 123, 130, 139, 143, 144, 153, 154, 158, 167, 174, 181, 190, 194, 195, 204, 205, 209, 218, 225, 232, 241, 245, 246, 255, 256, 260, 269, 276, 283, 292, 296, 297, 306, 307, 311
Offset: 0

Views

Author

Stefano Spezia, May 12 2022

Keywords

Comments

Also the n-th partial sum of the main diagonal of A353109, or equivalently, the trace of the matrix M(n) whose permanent is A353933(n) for n > 0.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x(1+4x+9x^2+7x^3+7x^4+9x^5+4x^6+x^7+9x^8)/((1-x)^2(1+x+x^2)(1+x^3+x^6)),{x,0,56}],x]

Formula

G.f.: x*(1 + 4*x + 9*x^2 + 7*x^3 + 7*x^4 + 9*x^5 + 4*x^6 + x^7 + 9*x^8)/((1 - x)^2*(1 + x + x^2)*(1 + x^3 + x^6)).
a(n) = a(n-1) + a(n-9) - a(n-10) for n > 9.
a(n) ~ 51*n/9.

A057147 a(n) = n times sum of digits of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 22, 36, 52, 70, 90, 112, 136, 162, 190, 40, 63, 88, 115, 144, 175, 208, 243, 280, 319, 90, 124, 160, 198, 238, 280, 324, 370, 418, 468, 160, 205, 252, 301, 352, 405, 460, 517, 576, 637, 250, 306, 364, 424, 486, 550, 616
Offset: 0

Views

Author

N. J. A. Sloane, Sep 13 2000

Keywords

Comments

A056992(n) = A010888(a(n)). - Reinhard Zumkeller, Mar 19 2014

Crossrefs

Iterations: A047892 (start=2), A047912 (start=3), A047897 (start=5), A047898 (start=6), A047899 (start=7), A047900 (start=8), A047901 (start=9), A047902 (start=11).

Programs

  • Haskell
    a057147 n = a007953 n * n  -- Reinhard Zumkeller, Mar 19 2014
    
  • Maple
    for n from 0 to 150 do printf(`%d,`,n*add(convert(n, base, 10)[i], i=1..nops(convert(n,base, 10)))) od:
  • Mathematica
    Table[n*Total[IntegerDigits[n]], {n, 0, 100}]
  • PARI
    a(n) = n*sumdigits(n) \\ Franklin T. Adams-Watters, Aug 03 2014
    
  • Python
    [n*sum([int(d) for d in str(n)]) for n in range(10**5)] # Chai Wah Wu, Aug 05 2014

Formula

a(n) = n*A007953(n). - Michel Marcus, Aug 10 2014
G.f.: x * (d/dx) (1/(1 - x))*Sum_{k>=1} (x^k - x^(10^k+k) - 9*x^(10^k))/(1 - x^(10^k)). - Ilya Gutkovskiy, Mar 27 2018

Extensions

More terms from James Sellers and Larry Reeves (larryr(AT)acm.org), Sep 13 2000

A058369 Numbers k such that k and k^2 have same digit sum.

Original entry on oeis.org

0, 1, 9, 10, 18, 19, 45, 46, 55, 90, 99, 100, 145, 180, 189, 190, 198, 199, 289, 351, 361, 369, 379, 388, 450, 451, 459, 460, 468, 495, 496, 550, 558, 559, 568, 585, 595, 639, 729, 739, 775, 838, 855, 900, 954, 955, 990, 999, 1000, 1098, 1099, 1179, 1188, 1189
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 17 2000

Keywords

Comments

It is interesting that the graph of this sequence appears almost identical as the maximum value of n increases by factors of 10. Compare the graph of the b-file (having numbers up to 10^6) with the plot of the terms up to 10^8. - T. D. Noe, Apr 28 2012
If iterated digit sum (A010888, A056992) is used instead of just digit sum (A007953, A004159), we get A090570 of which this sequence is a subset. - Jeppe Stig Nielsen, Feb 18 2015
Hare, Laishram, & Stoll show that this sequence (indeed, even its subsequence A254066) is infinite. In particular for each k in {846, 847, 855, 856, 864, 865, 873, ...} there are infinitely many terms in this sequence not divisible by 10 that have digit sum k. - Charles R Greathouse IV, Aug 25 2015
There are infinitely many n such that both n and n+1 are in the sequence. This includes A002283. - Robert Israel, Aug 26 2015

Examples

			Digit sum of 9 = 9 9^2 = 81, 8+1 = 9 digit sum of 145 = 1+4+5 = 10 145^2 = 21025, 2+1+0+2+5 = 10 digit sum of 954 = 9+5+4 = 18 954^2 = 910116, 9+1+0+1+1+6 = 18. - Florian Roeseler (hazz_dollazz(AT)web.de), May 03 2010
		

Crossrefs

Cf. A147523 (number of numbers in each decade).
Subsequence of A090570.

Programs

  • Haskell
    import Data.List (elemIndices)
    import Data.Function (on)
    a058369 n = a058369_list !! (n-1)
    a058369_list =
       elemIndices 0 $ zipWith ((-) `on` a007953) [0..] a000290_list
    -- Reinhard Zumkeller, Aug 17 2011
    
  • Magma
    [n: n in [0..1200] |(&+Intseq(n)) eq (&+Intseq(n^2))]; // Vincenzo Librandi, Aug 26 2015
    
  • Maple
    sd := proc (n) options operator, arrow: add(convert(n, base, 10)[j], j = 1 .. nops(convert(n, base, 10))) end proc: a := proc (n) if sd(n) = sd(n^2) then n else end if end proc; seq(a(n), n = 0 .. 1400); # Emeric Deutsch, May 11 2010
    select(t -> convert(convert(t,base,10),`+`)=convert(convert(t^2,base,10),`+`),
    [seq(seq(9*i+j,j=0..1),i=0..1000)]); # Robert Israel, Aug 26 2015
  • Mathematica
    Select[Range[0,1200],Total[IntegerDigits[#]]==Total[IntegerDigits[ #^2]]&] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    is(n)=sumdigits(n)==sumdigits(n^2) \\ Charles R Greathouse IV, Aug 25 2015
    
  • Python
    def ds(n): return sum(map(int, str(n)))
    def ok(n): return ds(n) == ds(n**2)
    def aupto(nn): return [m for m in range(nn+1) if ok(m)]
    print(aupto(1189)) # Michael S. Branicky, Jan 09 2021

Formula

A007953(a(n)) = A004159(a(n)). - Reinhard Zumkeller, Apr 25 2009

Extensions

Edited by N. J. A. Sloane, May 30 2010

A056991 Numbers with digital root 1, 4, 7 or 9.

Original entry on oeis.org

1, 4, 7, 9, 10, 13, 16, 18, 19, 22, 25, 27, 28, 31, 34, 36, 37, 40, 43, 45, 46, 49, 52, 54, 55, 58, 61, 63, 64, 67, 70, 72, 73, 76, 79, 81, 82, 85, 88, 90, 91, 94, 97, 99, 100, 103, 106, 108, 109, 112, 115, 117, 118, 121, 124, 126, 127, 130, 133, 135, 136, 139, 142
Offset: 1

Views

Author

Keywords

Comments

All squares are members (see A070433).
May also be defined as: possible sums of digits of squares. - Zak Seidov, Feb 11 2008
First differences are periodic: 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, ... - Zak Seidov, Feb 11 2008
Minimal n with corresponding sum-of-digits(n^2) are: 1, 2, 4, 3, 8, 7, 13, 24, 17, 43, 67, 63, 134, 83, 167, 264, 314, 313, 707, 1374, 836, 1667, 2236, 3114, 4472, 6833, 8167, 8937, 16667, 21886, 29614, 60663, 41833, 74833, 89437, 94863, 134164, 191833.
a(n) is the set of all m such that 9k+m can be a perfect square (quadratic residues of 9 including the trivial case of 0). - Gary Detlefs, Mar 19 2010
From Klaus Purath, Feb 20 2023: (Start)
The sum of digits of any term belongs to the sequence. Also the products of any terms belong to the sequence.
This is the union of A017173, A017209, A017245 and A008591.
Positive integers of the forms x^2 + (2*m+1)*x*y + (m^2+m-2)*y^2, for integers m.
This sequence is closed under multiplication. (End)

Crossrefs

For complement see A268226.

Programs

  • Maple
    seq( 3*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/2, n=1..63); # Gary Detlefs, Mar 19 2010
  • Mathematica
    LinearRecurrence[{1,0,0,1,-1},{1,4,7,9,10},70] (* Harvey P. Dale, Aug 29 2015 *)
  • PARI
    forstep(n=1,1e3,[3,3,2,1],print1(n", ")) \\ Charles R Greathouse IV, Sep 21 2012

Formula

From R. J. Mathar, Feb 14 2008: (Start)
O.g.f.: x*(2x+1)*(x^2+x+1)/((-1+x)^2*(x+1)*(x^2+1)).
a(n) = a(n-4) + 9. (End)
a(n) = 3*(n - floor(n/4)) - (3 - i^n - (-i)^n - (-1)^n)/2, where i = sqrt(-1). - Gary Detlefs, Mar 19 2010
a(n) = a(n-1)+a(n-4)-a(n-5). - Wesley Ivan Hurt, May 27 2021
a(n) = 3*n - floor(n/4) - 2*floor((n+3)/4). - Ridouane Oudra, Jan 21 2024
E.g.f.: (cos(x) + (9*x - 1)*cosh(x) - 3*sin(x) + (9*x - 2)*sinh(x))/4. - Stefano Spezia, Feb 21 2024

Extensions

Edited by N. J. A. Sloane, May 16 2008 at the suggestion of R. J. Mathar

A353109 Array read by antidiagonals: A(n, k) is the digital root of n*k with n >= 0 and k >= 0.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Apr 24 2022

Keywords

Examples

			The array begins:
    0, 0, 0, 0, 0, 0, 0, 0, ...
    0, 1, 2, 3, 4, 5, 6, 7, ...
    0, 2, 4, 6, 8, 1, 3, 5, ...
    0, 3, 6, 9, 3, 6, 9, 3, ...
    0, 4, 8, 3, 7, 2, 6, 1, ...
    0, 5, 1, 6, 2, 7, 3, 8, ...
    0, 6, 3, 9, 6, 3, 9, 6, ...
    0, 7, 5, 3, 1, 8, 6, 4, ...
    ...
		

Crossrefs

Cf. A003991, A004247, A010888, A056992 (diagonal), A073636, A139413, A180592, A180593, A180594, A180595, A180596, A180597, A180598, A180599, A303296, A336225, A353128 (antidiagonal sums), A353933, A353974 (partial sum of the main diagonal).

Programs

  • Mathematica
    A[i_,j_]:=If[i*j==0,0,1+Mod[i*j-1,9]];Flatten[Table[A[n-k,k],{n,0,12},{k,0,n}]]
  • PARI
    T(n,k) = if (n && k, (n*k-1)%9+1, 0); \\ Michel Marcus, May 12 2022

Formula

A(n, k) = A010888(A004247(n, k)).
A(n, k) = A010888(A003991(n, k)) for n*k > 0.

A073636 Period 3: repeat [1, 8, 9] ; Digital root of A000578(n) = n^3 for n >= 1.

Original entry on oeis.org

1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9, 1, 8, 9
Offset: 1

Views

Author

Zak Seidov, Sep 01 2002

Keywords

Comments

a(n) is the decimal expansion of 70/37. [Enrique Pérez Herrero, Jul 28 2009]; corrected by David A. Corneth, Jun 30 2016

Crossrefs

Cf. A000578, A004164, A010888, A021596. Digital roots of squares are in A056992.

Programs

  • Magma
    &cat [[1, 8, 9]^^30]; // Wesley Ivan Hurt, Jun 30 2016
  • Maple
    seq(op([1, 8, 9]), n=1..50); # Wesley Ivan Hurt, Jun 30 2016
  • Mathematica
    n=3; su[x_] := Sum[IntegerDigits[x][[i]], {i, Length[IntegerDigits[x]]}]; Table[su[su[su[su[x^n]]]], {x, 100}]
    NestWhile[Total[IntegerDigits[#]] &, #1, # > 9 &] & /@ (Range[87]^3) (* Jayanta Basu, Jul 03 2013 *)

Formula

G.f.: x*(9*x^2+8*x+1)/(1-x^3). - Ant King, Apr 30 2013
From Wesley Ivan Hurt, Jun 30 2016: (Start)
a(n) = a(n-3) for n>3.
a(n) = 6 + 3*cos(2*n*Pi/3) - 7*sin(2*n*Pi/3)/sqrt(3). (End)

Extensions

Decimal expansion fraction corrected by Ant King, Apr 30 2013
Edited: name specified, offset changed from 0 to 1 (according to name), adjusted formula and g.f. for offset 1, digital root link added. - Wolfdieter Lang, Jan 05 2015

A339023 Replace each digit d in the decimal representation of n with the digital root of n*d.

Original entry on oeis.org

0, 1, 4, 9, 7, 7, 9, 4, 1, 9, 10, 22, 36, 43, 52, 63, 76, 82, 99, 19, 40, 63, 88, 16, 36, 58, 73, 99, 28, 49, 90, 34, 61, 99, 31, 64, 99, 37, 67, 99, 70, 25, 63, 13, 55, 99, 46, 85, 36, 79, 70, 36, 85, 46, 99, 55, 13, 63, 25, 79, 90, 67, 37, 99, 64, 31, 99, 61
Offset: 0

Views

Author

Sebastian Karlsson, Jan 18 2021

Keywords

Examples

			a(23) = 16 because 2*23 = 46 and 3*23 = 69 and the digital roots of 46 and 69 are 1 and 6.
		

Crossrefs

Programs

  • PARI
    dr(n) = if(n, (n-1)%9+1); \\ A010888
    a(n) = if (n==0, return(0)); my(d=digits(n), s=""); for (k=1, #d, s=concat(s, dr(n*d[k]))); eval(s); \\ Michel Marcus, Jan 18 2021
  • Python
    def digitalroot(n):
        return 0 if n == 0 else (n-1)%9 + 1
    def a(n):
        return int(''.join([str(digitalroot(n*int(d))) for d in str(n)]))
    for n in range(0, 68):
        print(a(n), end=', ')
    

Formula

a(9*n + 1) = 9*n + 1.
a(10*n) = 10*a(n). - Sebastian Karlsson, Feb 14 2021

A021115 Decimal expansion of 1/111.

Original entry on oeis.org

0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9
Offset: 0

Views

Author

Keywords

Comments

Period 3: repeat [0, 0, 9]. - Joerg Arndt, Sep 29 2015

Crossrefs

Programs

Formula

From Alexander R. Povolotsky, Sep 29 2015: (Start)
G.f.: 9*x^2/(1 - x^3).
a(n) = (9/2)*( (n-1)*n mod 3 ) = 4*(n mod 3) - 2*((n+1) mod 3) + ((n+2) mod 3), formulas suggested by Giovanni Resta.
a(n) = 3*( 1 + cos(2*(n+1)*Pi/3) + cos(4*(n+1)*Pi/3) ).
a(n) = a(n + 3) for n>2.
a(n) = A056992(n+1) - (3*(n+1)^4+3*(n+1)^6+4*(n+1)^8) mod 9. (End)
a(n) = 9*A022003(n). - Robert Israel, Sep 30 2015

Extensions

Edited by Bruno Berselli, Dec 15 2015

A191760 Digital root of the n-th odd square.

Original entry on oeis.org

1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1
Offset: 1

Views

Author

Ant King, Jun 17 2011

Keywords

Comments

This sequence is periodic with period <1,9,7,4,9,4,7,9,1> of length nine.
Related to the continued fraction of (153727+sqrt(2207057870693))/1477642 = 1+ 1/(9+1/(7+1/...)). - R. J. Mathar, Jun 27 2011

Examples

			The fifth, odd square number is 81 which has digital root 9. Hence a(5)=9.
		

Crossrefs

Programs

  • Mathematica
    DigitalRoot[n_Integer?Positive]:=FixedPoint[Plus@@IntegerDigits[#]&,n];DigitalRoot[#] &/@((2#-1)^2 &/@Range[81])
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 9, 7, 4, 9, 4, 7, 9, 1},81] (* Ray Chandler, Aug 25 2015 *)
    PadRight[{},120,{1,9,7,4,9,4,7,9,1}] (* Harvey P. Dale, Jun 26 2021 *)

Formula

a(n) = 3*(1+cos(2(n-2)pi/3)+cos(4(n-2)pi/3)) +mod( (1+n)(1+7n-7n^2+7n^3+n^4-n^5+3n^6+3n^7), 9).
a(n) = a(n-9).
a(n) = 51-a(n-1)-a(n-2)-a(n-3)-a(n-4)-a(n-5)-a(n-6)-a(n-7)-a(n-8).
a(n) = A010888(A016754(n)).
G.f.: x(1+9x+7x^2+4x^3+9x^4+4x^5+7x^6+9x^7+x^8)/( (1-x)*(1+x+x^2)*(1+x^3+x^6) ) (note that the coefficients of x in the numerator are precisely the terms that constitute the periodic cycle of the sequence).
a(n) = A056992(2n-1). - R. J. Mathar, Jun 27 2011

A191762 Digital roots of the nonzero even squares.

Original entry on oeis.org

4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 9, 7, 4, 9
Offset: 1

Views

Author

Ant King, Jun 18 2011

Keywords

Comments

Period 9: repeat [4, 7, 9, 1, 1, 9, 7, 4, 9]. Bisection of A056992.
The digits in the 9-cycle of this sequence are the same as the digits in the 9-cycle of the digital roots of the odd squares A191760(n). However, these are offset differently (by the first five terms) and hence constitute a different sequence.

Examples

			The fifth even, nonzero square is 100, which has digital root 1. Hence a(5)=1.
		

Crossrefs

Programs

  • Mathematica
    DigitalRoot[n_Integer?Positive]:=FixedPoint[Plus@@IntegerDigits[#]&,n];DigitalRoot[(2#)^2] &/@Range[63]
  • PARI
    a(n)=(4*n^2-1)%9+1 \\ Charles R Greathouse IV, Jun 19 2011

Formula

a(n) = 3*(1 + cos(2*n*Pi/3) + cos(4*n*Pi/3)) + (4*n^4 + 7*n^6 + 2*n^8) mod 9.
G.f.: x*(4 + 7*x + 9*x^2 + x^3 + x^4 + 9*x^5 + 7*x^6 + 4*x^7 + 9*x^8)/(1-x^9) (note that the coefficients of x in the numerator are precisely the terms that constitute the periodic cycle of the sequence).
a(n) = A010888(A016742(n)). - Michel Marcus, Aug 11 2015
Showing 1-10 of 17 results. Next