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

A061105 Smallest number whose sum of digits is n^3.

Original entry on oeis.org

0, 1, 8, 999, 19999999, 89999999999999, 999999999999999999999999, 199999999999999999999999999999999999999, 899999999999999999999999999999999999999999999999999999999
Offset: 0

Views

Author

Amarnath Murthy, Apr 20 2001

Keywords

Comments

Except for the leading digit all the other digits of a(n), n >= 1, are 9's and the leading digit is 1 or 8. (This is because the digital sum of n^3 is congruent to 0, 1, or 8 mod 9, so the best we can do is use as many 9's as possible, prefixed if necessary by 1 or 8. - N. J. A. Sloane, Jul 19 2018)

Examples

			a(4) = 19999999, 1+9+9+9+9+9+9+9 = 64 = 4^3.
		

Crossrefs

Programs

  • Mathematica
    Do[a = {}; While[Apply[Plus, a] + 9 < n^3, a = Append[a, 9]]; If[ Apply[ Plus, a] != n^3, a = Prepend[ a, n^3 - Apply[ Plus, a]] ]; Print[ FromDigits[ a]], {n, 1, 10} ]
    dsn3[n_]:=Module[{t=(n^3-{0,1,8})/9},Which[ IntegerQ[t[[1]]],FromDigits[ PadRight[ {},t[[1]],9]],IntegerQ[t[[2]]],FromDigits[ PadRight[ {1}, t[[2]]+1,9]],IntegerQ[t[[3]]],FromDigits[PadRight[{8},t[[3]]+1,9]]]]; Array[dsn3,10,0] (* Harvey P. Dale, Jul 19 2018 *)
  • PARI
    a(n) = { ((n%3)^3 + 1)*10^(n^3\9) - 1 } \\ Harry J. Smith, Jul 19 2009

Formula

a(n) = A051885(n^3).
a(n) =((n mod 3)^3+1)*10^floor[n^3/9]-1 =(A021559(n+1)+1)*10^A061263(n)-1. - Henry Bottomley, Apr 24 2001

Extensions

More terms from Robert G. Wilson v, Apr 21 2001

A167176 a(n) = n^3 mod 9.

Original entry on oeis.org

0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8, 0, 1, 8
Offset: 0

Views

Author

Zerinvary Lajos, Oct 29 2009

Keywords

Comments

Essentially a duplicate of A021559. - N. J. A. Sloane, Oct 30 2009
Equivalently: n^(6*m + 3) mod 9. - G. C. Greubel, Jun 04 2016
Decimal expansion of 2/111. - Elmo R. Oliveira, Feb 19 2024

Programs

Formula

G.f.: -x*(1+8*x) / ( (x-1)*(1+x+x^2) ). - R. J. Mathar, Aug 24 2016

A060154 Table T(n,k) by antidiagonals of n^k mod k [n,k >= 1].

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 12 2001

Keywords

Examples

			T(5,3) = 5^3 mod 3 = 125 mod 3 = 2.
Rows start:
  0, 1, 1, 1, 1, ...
  0, 0, 2, 0, 2, ...
  0, 1, 0, 1, 3, ...
  0, 0, 1, 0, 4, ...
  0, 1, 2, 1, 0, ...
		

Crossrefs

Rows include A057427, A015910, A056969.
Columns include A000004, A000035 (several times), A010872, A010874, A010876, A021559 and other periodic sequences.
Diagonals include A000004 and A057427.
Cf. A114448.

Formula

T(n, k) = A051129(n, k)-n*A060155(n, k).

A114448 Array a(n,k) = n^k (mod k) read by antidiagonals (k>=1, n>=1).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Feb 14 2006

Keywords

Comments

Alternate description: triangular array a(n, k) = n^k (mod k) read by rows (n > 1, 0 < k < n). This is equivalent because a(n, k) = a(n-k, k). - David Wasserman, Jan 25 2007

Examples

			2^6 = 64 and 64 (mod 6) is 4. So a(2,6) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := Mod[n^k, k]; Table[a[n - k + 1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)

Extensions

More terms from David Wasserman, Jan 25 2007
Showing 1-4 of 4 results.