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.

Previous Showing 11-20 of 32 results. Next

A231689 a(n) = Sum_{i=0..n} digsum(i)^4, where digsum(i) = A007953(i).

Original entry on oeis.org

0, 1, 17, 98, 354, 979, 2275, 4676, 8772, 15333, 15334, 15350, 15431, 15687, 16312, 17608, 20009, 24105, 30666, 40666, 40682, 40763, 41019, 41644, 42940, 45341, 49437, 55998, 65998, 80639, 80720, 80976, 81601, 82897, 85298, 89394, 95955, 105955, 120596, 141332, 141588, 142213, 143509, 145910, 150006, 156567, 166567, 181208, 201944, 230505, 231130, 232426, 234827, 238923
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • Maple
    See A037123.
  • Mathematica
    Accumulate[Table[Total[IntegerDigits[n]]^4,{n,0,60}]] (* Harvey P. Dale, May 12 2014 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i)^4); \\ Michel Marcus, Sep 20 2017

A053064 Alternately append n to end or beginning of previous term.

Original entry on oeis.org

1, 12, 312, 3124, 53124, 531246, 7531246, 75312468, 975312468, 97531246810, 1197531246810, 119753124681012, 13119753124681012, 1311975312468101214, 151311975312468101214, 15131197531246810121416, 1715131197531246810121416, 171513119753124681012141618
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

A055642(a(n)) = A058183(n); A007953(a(n)) = A037123(n); A010879(a(n)) = A010879(2*floor(n/2)) = A010879(A131055(n)); A000030(a(n)) = A000030(ceiling(n/2)). - Reinhard Zumkeller, Oct 10 2008

References

  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press 2000

Crossrefs

Extensions

More terms from Sean A. Irvine, Dec 05 2021

A256379 Cumulative sum for n in base 10 when alternately adding and subtracting each digit of a particular value.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 44, 44, 43, 39, 36, 30, 25, 17, 10, 0, 2, 1, 1, 6, 8, 15, 19, 28, 34, 45, 42, 44, 39, 39, 38, 30, 27, 17, 12, 0, 4, 1, 7, 6, 6, 15, 17, 28, 32, 45, 40, 44, 37, 39, 30, 30, 29, 17, 14, 0, 6, 1, 9, 6, 16, 15, 15, 28, 30, 45, 38, 44, 35, 39, 28, 30, 17, 17, 16, 0, 8, 1, 11, 6, 18, 15, 29, 28, 28, 45, 36, 44, 33, 39, 26, 30
Offset: 1

Views

Author

Anthony Sand, Mar 27 2015

Keywords

Comments

For n = 1..9, the function is encountering each digit for the first time, therefore each is added to the cumulative sum. At n = 9, the sum is 45. At n = 10, the sum is 44, because the digit 1 is encountered for the second time and is therefore subtracted. At n = 11, the sum is again 44, because 1 is added and then subtracted. At n = 12, the sum is 43, because 1 is added and 2, encountered for the second time, is subtracted.
0 <= a(n) <= 45 for all n; a(n) = a(n mod 20) for odd n. - Danny Rorabaugh, Mar 31 2015

Crossrefs

Cf. A037123, A167232, A256100, A256851 (first differences).

Programs

  • Mathematica
    f[n_] := Block[{g, r = PadRight[Range@ 9, 10]}, g[x_] := Boole[OddQ /@ DigitCount[x]]; Total[r Boole[OddQ /@ Total[g /@ Range@ n]]]]; Array[f, 120] (* Michael De Vlieger, Mar 29 2015 *)
  • PARI
    { nmx=1000; b=10; dig=vector(b); for(i=1,b,dig[i]=1); n=0; s=0; while(n
    				

Formula

a(n) = Sum_{k=1..n} M(k), with M(k) := Sum_{m=1..r(k)} (-1)^(a(k,m) + 1)*digit(k,m), where a(k,m) = A256100(k,m) read as an array with row length r(k) (number of digits of k), and digit(k,m) is the m-th digit of k. - Wolfdieter Lang, Apr 08 2015

A271626 Numbers n such that the sum of the digits of the numbers from 0 to n is a square.

Original entry on oeis.org

0, 1, 8, 17, 19, 27, 46, 62, 91, 99, 145, 152, 304, 359, 472, 513, 571, 684, 720, 799, 913, 1204, 1232, 1413, 1771, 2599, 2907, 3059, 3509, 3769, 3887, 4158, 4507, 4787, 5071, 6209, 7399, 7739, 8059, 8486, 9566, 10709, 11545, 12139, 13284, 13573, 14607, 15417
Offset: 1

Views

Author

Paolo P. Lava, Apr 11 2016

Keywords

Examples

			0 = 0^2 and 1 = 1^2;
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36 = 6^2;
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 + 0 + 1 + 1 + 1 + 2 + 1 + 3 + 1 + 4 + 1 + 5 + 1 + 6 + 1 + 7 = 81 = 9^2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,k,n; a:=0; for n from 0 to q do b:=0; c:=n;
    for k from 1 to ilog10(n)+1 do b:=b+(c mod 10); c:=trunc(c/10); od; a:=a+b;
    if a=trunc(sqrt(a))*trunc(sqrt(a)) then print(n); fi; od; end: P(10^6);
  • Mathematica
    Select[Range[0, 16000], IntegerQ@ Sqrt@ Total@ Map[Total@ IntegerDigits@ # &, Range[0, #]] &] (* Michael De Vlieger, Apr 11 2016 *)
  • PARI
    isok(n) = issquare(sum(k=1, n, sumdigits(k))); \\ Michel Marcus, Apr 11 2016

A071121 a(n) = a(n-1) + sum of decimal digits of n^3.

Original entry on oeis.org

1, 9, 18, 28, 36, 45, 55, 63, 81, 82, 90, 108, 127, 144, 162, 181, 198, 216, 244, 252, 270, 289, 306, 324, 343, 369, 396, 415, 441, 450, 478, 504, 531, 550, 576, 603, 622, 648, 675, 685, 711, 738, 766, 792, 810, 838, 855, 873, 901, 909, 927, 946, 981, 1008
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

References

  • N. Agronomof, Question 4420, L'Intermédiaire des Math. 21 (1914), 147.

Crossrefs

Partial sums of A004164.

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[n^3]]; Print[s], {n, 1, 128}]
    nxt[{n_,a_}]:={n+1,a+Total[IntegerDigits[(n+1)^3]]}; NestList[nxt,{1,1},60][[;;,2]] (* Harvey P. Dale, Aug 30 2025 *)

A256851 First-order differences for the cumulative sum of the digits of the integers when alternately adding and subtracting each digit of a particular value.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 0, -1, -4, -3, -6, -5, -8, -7, -10, 2, -1, 0, 5, 2, 7, 4, 9, 6, 11, -3, 2, -5, 0, -1, -8, -3, -10, -5, -12, 4, -3, 6, -1, 0, 9, 2, 11, 4, 13, -5, 4, -7, 2, -9, 0, -1, -12, -3, -14, 6, -5, 8, -3, 10, -1, 0, 13, 2, 15, -7, 6, -9, 4, -11, 2, -13, 0, -1, -16, 8, -7, 10, -5, 12, -3, 14, -1, 0, 17, -9, 8, -11, 6, -13, 4, -15
Offset: 1

Views

Author

Anthony Sand, Apr 11 2015

Keywords

Comments

The sequence was suggested by Wolfdieter Lang and represents a(n) - a(n-1) for the sequence A256379, which alternately adds and subtracts each digit of a particular value in the integers.

Examples

			a(0) = 0, therefore a(1) - a(0) = 1 - 0 = 1.
For n = 1..9, the function is encountering each digit for the first time, therefore a(9) = 45.
For n = 10, the function encounters the digit 1 for the second time and subtracts it. Therefore a(10) = 44 and a(10) - a(9) = -1.
		

Crossrefs

Programs

  • PARI
    { nmx=1000; b=10; dig=vector(b); si=0; for(i=1,b,dig[i]=1); n=0; s=0; while(n
    				

Formula

a(n) = Sum_{m=1..r(n)} (-1)^(a(n,m) + 1)*digit(n,m), where a(n,m) = A256100(n,m) read as an array with row length r(n) (number of digits of n), and digit(n,m) is the m-th digit of n (see the formula for A256379). - Wolfdieter Lang, Apr 15 2015

A271629 Squares that are the sum of the digits of the numbers from 0 to n, for some n.

Original entry on oeis.org

0, 1, 36, 81, 100, 144, 289, 441, 784, 900, 1225, 1296, 3025, 3600, 5041, 5625, 6400, 8100, 8649, 10000, 11881, 15625, 15876, 18225, 23716, 36100, 41616, 44100, 50625, 55225, 57600, 62001, 67600, 72900, 78400, 99225, 122500, 129600, 136900, 145161, 168921, 189225
Offset: 1

Views

Author

Paolo P. Lava, Apr 11 2016

Keywords

Examples

			0 = 0^2; 1 = 1^2; 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36 = 6^2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,k,n; a:=0; for n from 0 to q do b:=0; c:=n;
    for k from 1 to ilog10(n)+1 do b:=b+(c mod 10); c:=trunc(c/10); od; a:=a+b;
    if a=trunc(sqrt(a))*trunc(sqrt(a)) then print(a); fi; od; end: P(10^6);
  • Mathematica
    Select[Accumulate@ Map[Total@ IntegerDigits@ # &, Range[0, 10^4]], IntegerQ@ Sqrt@ # &] (* Michael De Vlieger, Apr 11 2016 *)
  • PARI
    lista(nn) = for (n=0, nn, if (issquare(s=sum(k=1, n, sumdigits(k))), print1(s, ", "))); \\ Michel Marcus, Apr 11 2016

A071421 a(n) = a(n-1) + sum of decimal digits of n^n.

Original entry on oeis.org

1, 5, 14, 27, 38, 65, 90, 127, 172, 173, 214, 268, 326, 378, 477, 565, 663, 771, 898, 929, 1046, 1194, 1340, 1493, 1644, 1798, 1987, 2150, 2317, 2380, 2564, 2769, 2976, 3190, 3450, 3720, 3991, 4256, 4562, 4674, 4982, 5297, 5610, 5935, 6241, 6593, 6967
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[n^n]]; Print[s], {n, 1, 128}]
    nxt[{n_,a_}]:={n+1,a+Total[IntegerDigits[(n+1)^(n+1)]]}; NestList[nxt,{1,1},50][[All,2]] (* Harvey P. Dale, Dec 11 2016 *)

A071422 a(n) = a(n-1) + sum of decimal digits of sigma(n), the sum of divisors of n.

Original entry on oeis.org

1, 4, 8, 15, 21, 24, 32, 38, 42, 51, 54, 64, 69, 75, 81, 85, 94, 106, 108, 114, 119, 128, 134, 140, 144, 150, 154, 165, 168, 177, 182, 191, 203, 212, 224, 234, 245, 251, 262, 271, 277, 292, 300, 312, 327, 336, 348, 355, 367, 379, 388, 405, 414, 417, 426, 429
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Partial sums of A067342.

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[DivisorSigma[1, n]]]; Print[s], {n, 1, 128}]
    nxt[{n_,a_}]:={n+1,a+Total[IntegerDigits[DivisorSigma[1,n+1]]]}; Transpose[ NestList[nxt,{1,1},60]][[2]] (* Harvey P. Dale, Jan 25 2013 *)

A075359 Sum of the digits of the next n numbers.

Original entry on oeis.org

1, 5, 15, 25, 20, 39, 49, 53, 72, 91, 113, 141, 160, 137, 102, 121, 161, 207, 253, 203, 168, 223, 290, 354, 202, 287, 369, 388, 293, 393, 502, 362, 444, 571, 440, 531, 649, 509, 672, 655, 659, 813, 670, 881, 441, 505, 473, 537, 556, 605, 633, 697, 692, 801
Offset: 1

Views

Author

Amarnath Murthy, Sep 19 2002

Keywords

Examples

			a(5) = digit sum of 11,12,13,14 and 15 = 20.
		

Crossrefs

Cf. A037123.

Programs

  • Mathematica
    Total[Flatten[IntegerDigits/@#]]&/@With[{nn=60},TakeList[Range[(nn(nn+1))/2],Range[ nn]]] (* Harvey P. Dale, Jul 11 2023 *)

Formula

a(n) = A037123(n*(n+1)/2)-A037123(n*(n-1)/2). - David Wasserman, Jan 16 2005

Extensions

More terms from David Wasserman, Jan 16 2005
Previous Showing 11-20 of 32 results. Next