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 21-30 of 66 results. Next

A225793 Numbers n that can be uniquely expressed as (m + sum of digits of m) for some m.

Original entry on oeis.org

2, 4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77
Offset: 1

Views

Author

Jayanta Basu, Jul 27 2013

Keywords

Comments

Subset of A176995; first member in A176995 that is not here is 101, next is 103 (cf. A230094).
A230093(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2013

Examples

			100 is a member as 100 = 86 + sum of digits of (86). 101 is not a member since both 91 and 100 generate 101. Again 103 is not a member as 92 and 101 generate 103.
		

References

  • Joshi, V. S. A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar. Math. Student 39 (1971), 327--328 (1972). MR0330032 (48 #8371)
  • Makowski, Andrzej. On Kaprekar's "junction numbers''. Math. Student 34 1966 77 (1967). MR0223292 (36 #6340)
  • Narasinga Rao, A. On a technique for obtaining numbers with a multiplicity of generators. Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)

Crossrefs

Programs

  • Haskell
    a225793 n = a225793_list !! (n-1)
    a225793_list = filter ((== 1) . a230093) [1..]
    -- Reinhard Zumkeller, Oct 11 2013
  • Maple
    For Maple code see A230093. - N. J. A. Sloane, Oct 11 2013
  • Mathematica
    co[n_] := Count[Range[n - 1], _?(# + Total[IntegerDigits[#]] == n &)]; Select[Range[100], co[#] == 1 &]
    Select[Tally[Table[m+Total[IntegerDigits[m]],{m,100}]],#[[2]]==1&][[All, 1]]// Sort (* Harvey P. Dale, Aug 23 2017 *)

A229168 Define a sequence of real numbers by b(1)=2, b(n+1) = b(n) + log_2(b(n)); a(n) = smallest i such that b(i) >= 2^n.

Original entry on oeis.org

1, 3, 5, 7, 11, 17, 27, 44, 74, 127, 225, 402, 728, 1333, 2459, 4566, 8525, 15993, 30122, 56936, 107953, 205253, 391223, 747369, 1430648, 2743721, 5270959, 10141978, 19542806, 37708232, 72849931, 140905791, 272836175, 528832794, 1026008203, 1992390617
Offset: 1

Views

Author

N. J. A. Sloane, Sep 27 2013

Keywords

Examples

			The initial terms of the b(n) sequence are approximately
2, 3.00000000000000000000000, 4.58496250072115618145375, 6.78187243514238888864578, 9.54355608312733448665509, 12.7980830210090262451102, 16.4759388461842196480290, 20.5182276175427023220954, 24.8770618274970204646817, 29.5138060245244394221195, 34.3971240984210783617324, ...
b(5) is the first term >= 8, so a(3) = 5.
		

Crossrefs

Programs

  • Maple
    # A229168, A229169, A229170.
    Digits:=24;
    log2:=evalf(log(2));
    lis:=[2]; a:=2;
    t1:=[1]; l:=2;
    for i from 2 to 128 do
    a:=evalf(a+log(a)/log2);
    if a >= 2^l then
    l:=l+1; t1:=[op(t1),i]; fi;
    lis:=[op(lis),a];
    od:
    lis;
    map(floor,lis);
    map(ceil,lis);
    t1;
  • PARI
    n=1; p2=2^n; m=2; lg2=log(2); for(i=1, 1992390617, if(m>=p2, print(n " " i); n++; p2=2^n); m=m+log(m)/lg2) /* Donovan Johnson, Oct 04 2013 */

Extensions

a(11)-a(36) from Donovan Johnson, Oct 04 2013

A219675 Starting with a(0)=0, a(n) = 1 + the sum of the digital sums of a(0) through a(n-1).

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538, 554, 568
Offset: 0

Views

Author

Bob Selcoe, Nov 17 2014

Keywords

Comments

Almost identical to A004207, only difference being a(0). - Yuval Filmus, Apr 22 2016.

Examples

			a(7) = 28 because (0+1+2+4+8+1+6+2+3) + 1 = 28.
		

Crossrefs

Cf. A004207 (essentially the same), A007953 (sum of digits), A244510 (related).

Programs

  • Mathematica
    a219675[n_Integer] := Module[{f}, f[0] = 0; f[k_] := 1 + Sum[Plus @@ IntegerDigits[f[i]], {i, 0, k - 1}]; f[n]]; a219675/@Range[40] (* Michael De Vlieger, Nov 17 2014 *)
  • PARI
    lista(nn) = {v = vector(nn); for (n=2, nn, v[n] = 1 + sum(k=1, n-1, sumdigits(v[k])););v;} \\ Michel Marcus, Nov 17 2014
    
  • PARI
    A219675_upto(n)=vector(n,i,n=if(i<3, i-1, n+sumdigits(n))) \\ M. F. Hasler, Oct 30 2024

Formula

a(n) = Sum_{k=0..n-1} digsum(a(k)) + 1.
a(n) = a(n-1) + digsum(a(n-1)).

Extensions

More terms from Michel Marcus, Nov 17 2014

A229171 Define a sequence of real numbers by b(1)=e, b(n+1) = b(n) + log(b(n)); a(n) = smallest i such that b(i) >= e^n.

Original entry on oeis.org

1, 5, 10, 20, 41, 86, 192, 441, 1039, 2493, 6072, 14960, 37199, 93193, 234957, 595562, 1516639, 3877905, 9950908, 25615654, 66127187, 171144672, 443966371, 1154115393, 3005950908
Offset: 1

Views

Author

N. J. A. Sloane, Sep 27 2013

Keywords

Examples

			The initial terms of the b(n) sequence are approximately
2.71828182845904523536029, 3.71828182845904523536029, 5.03154351597726806940929, 6.64727031503970856301384, 8.54147660649653209023621, 10.6864105040926911986276, 13.0553833920216929230460, 15.6245839611886549261305, 18.3734295299727029212384, 21.2843351036624388705641, 24.3423064646657059114213, 27.5345223079930416816192, 30.8499628820185220765989, ...
b(5) is the first term >= e^2, so a(2) = 5.
		

Crossrefs

Programs

  • Maple
    # A229171, A229172, A229173.
    Digits:=24;
    e:=evalf(exp(1));
    lis:=[e]; a:=e;
    t1:=[1]; l:=2;
    for i from 2 to 128 do
    a:=evalf(a+log(a));
    if a >= e^l then
    l:=l+1; t1:=[op(t1),i]; fi;
    lis:=[op(lis),a];
    od:
    lis;
    map(floor,lis);
    map(ceil,lis);
    t1;
  • PARI
    n=1; m=exp(1); mn=m^n; for(i=1, 3005950908, if(m>=mn, print(n " " i); n++; mn=exp(1)^n); m=m+log(m)) /* Donovan Johnson, Oct 04 2013 */

Extensions

a(7)-a(25) from Donovan Johnson, Oct 04 2013

A286660 a(n) = a(n-1) + sum of base-100 digits of a(n-1), a(0) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 157, 215, 232, 266, 334, 371, 445, 494, 592, 689, 784, 875, 958, 1025, 1060, 1130, 1171, 1253, 1318, 1349, 1411, 1436, 1486, 1586, 1687, 1790, 1897, 2012, 2044, 2108, 2137, 2195, 2311, 2345, 2413, 2450, 2524, 2573, 2671, 2768, 2863, 2954, 3037, 3104, 3139
Offset: 0

Views

Author

Peter Weiss, May 12 2017

Keywords

Examples

			a(7) = 128 = 1 * 100^1 + 28 * 100^0. The sum of digits of a(8 - 1) = 128 in base 100 is therefore 1 + 28 = 29. a(8) = a(7) + the sum of digits of a(7) in base 100 is therefore 128 + 29 = 157.
		

Crossrefs

Programs

  • Maple
    g:= n -> n+convert(convert(n,base,100),`+`):
    A[0]:= 1:
    for n from 1 to 100 do A[n]:= g(A[n-1]) od:
    seq(A[i],i=0..100); # Robert Israel, May 22 2017
  • Mathematica
    a[0] = 1; a[n_] := a[n] = a[n-1] + Total[IntegerDigits[a[n-1], 100]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2017 *)
    NestList[#+Total[IntegerDigits[#,100]]&,1,60] (* Harvey P. Dale, May 26 2019 *)
  • PARI
    a(n) = if(n < 8, return(1<<(n-1))); my(r = cr = 128); for(i=8, n, while(cr > 0, r += cr % 100; cr \= 100); cr = r); r \\ David A. Corneth, May 15 2017

A326834 a(0) = 0; a(1) = 0; for n > 0, a(n) = the sum of the number of times each digit in a(n-1) has occurred from a(0) to a(n-2) inclusive.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 12, 3, 1, 3, 2, 2, 3, 3, 4, 1, 4, 2, 4, 3, 5, 1, 5, 2, 5, 3, 6, 1, 6, 2, 6, 3, 7, 1, 7, 2, 7, 3, 8, 1, 8, 2, 8, 3, 9, 1, 9, 2, 9, 3, 10, 22, 20, 25, 17, 15, 17, 18, 18, 20, 28, 21, 32, 28, 25, 25, 27
Offset: 0

Views

Author

Scott R. Shannon, Oct 20 2019

Keywords

Comments

This sequence sums the previous digits the same way as A309261, except that here digits in a(n-1) are not considered unique, so each digit in a(n-1) is summed regardless of the number of times it appears in a(n-1). This leads to this sequence being the same as A309261 up to a(66) = 22, after which they diverge.

Examples

			a(2) = 1, as a(1) = 0, and '0' has occurred one previous time in the sequence before a(1).
a(62) = 2, as a(61) = 9, and '9' has occurred two previous times. '2' has now occurred 10 times in the sequence.
a(66) = 22, as a(65) = 10, and '1' has occurred ten previous times, and '0' has occurred twelve previous times, and 10 + 12 = 22.
a(67) = 20, as a(66) = 22, and '2' has occurred ten previous times, and '2' has occurred ten previous times, and 10 + 10 = 20.
		

Crossrefs

Programs

  • Python
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        an, c = 0, Counter()
        while True:
            yield an
            s = str(an)
            an = sum(c[d] for d in s)
            c.update(s)
    print(list(islice(agen(), 82))) # Michael S. Branicky, Mar 24 2025

A084228 a(1)=1, a(2)=2; thereafter a(n) = sum of digits of (a(1)+a(2)+a(3)+...+a(n-1)).

Original entry on oeis.org

1, 2, 3, 6, 3, 6, 3, 6, 3, 6, 12, 6, 12, 15, 12, 15, 3, 6, 3, 6, 12, 6, 12, 15, 12, 15, 3, 6, 3, 6, 12, 6, 12, 15, 12, 15, 12, 6, 12, 6, 12, 15, 12, 15, 12, 15, 12, 6, 12, 15, 12, 15, 12, 15, 12, 15, 12, 15, 12, 15, 21, 15, 12, 15, 12, 15, 21, 24, 12, 15, 12, 15, 21, 24, 12, 15, 21, 15
Offset: 1

Views

Author

Benoit Cloitre, Jun 21 2003

Keywords

Comments

a(n) == 3 or 6 (mod 9) n>2.
a(n) = 3 for n in A084229.
a(n) = 6 for n = 4, 6, 8, 10, 12, 18, 20, 22, 28, 30, 32, 38, 40, 48, 86, 88, 90, 96, 98, 100, 106, 108, 116, 160, 162, 168, 170, 178, ..., 17630. - Robert G. Wilson v, Jun 27 2014

Crossrefs

Programs

  • Haskell
    a084228 n = a084228_list !! (n-1)
    a084228_list = 1 : 2 : f 3 where
       f x = y : f (x + y) where y = a007953 x
    -- Reinhard Zumkeller, Nov 13 2014
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = Sum[ Total@ IntegerDigits@ a@ i, {i, n - 1}]; Array[ Total@ IntegerDigits@ a@# &, 78] (* Robert G. Wilson v, Jun 27 2014 *)
    nxt[{t_,a_}]:=Module[{c=Total[IntegerDigits[t]]},{t+c,c}]; Join[{1},NestList[nxt,{3,2},80][[;;,2]]] (* Harvey P. Dale, Jul 13 2023 *)
  • PARI
    sumdig(n)=sum(k=0,ceil(log(n)/log(10)),floor(n/10^k)%10)
    an=vector(10000); a(n)=if(n<0,0,an[n])
    an[1]=1; an[2]=2; for(n=3,300,an[n]=sumdig(sum(k=1,n-1,a(k))))
    

A154770 a(n+1) = A154771(a(n)) = sum of all distinct "valid substrings" of a(n); a(1)=10 (least nontrivial choice).

Original entry on oeis.org

10, 11, 12, 15, 21, 24, 30, 33, 36, 45, 54, 63, 72, 81, 90, 99, 108, 127, 176, 283, 407, 458, 578, 733, 849, 1003, 1117, 1381, 2044, 2318, 2953, 4397, 5435, 6557, 7964, 9989, 12279, 16572, 26426, 36970, 49970, 67738, 84716, 100181, 111599, 139413, 209606
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Jan 16 2009

Keywords

Comments

"Valid substrings" means all numbers that appear as substring of n (written in decimal system). Starting values < 10 would yield a constant sequence.

Examples

			a(1) = 10 has { 0, 1, 10 } as distinct substrings,
a(2) = 0+1+10 = 11 has { 1, 11 } as distinct substrings,
a(3) = 1+11 = 12 has { 1, 2, 12 } as distinct substrings,
a(4) = 1+2+12 = 15 has { 1, 5, 15 } as distinct substrings.
		

Crossrefs

Programs

  • PARI
    A154770( n=2, a=10 ) = { local(d); while( n--, a=vecsort(concat(vector(d=#Str(a),i,vector(d,j,a%10^j)+(d--&!a\=10))),NULL,8);a*=vector(#a,i,1)~); a }
    print1(a=10);for(i=1,50,print1("," a=A154770(,a)))

Extensions

The word "distinct" added to definition Jan 19 2009 at the suggestion of Hugo van der Sanden.

A169732 a(1) = 1000; for n>1, a(n) = a(n-1) - digitsum(a(n-1)).

Original entry on oeis.org

1000, 999, 972, 954, 936, 918, 900, 891, 873, 855, 837, 819, 801, 792, 774, 756, 738, 720, 711, 702, 693, 675, 657, 639, 621, 612, 603, 594, 576, 558, 540, 531, 522, 513, 504, 495, 477, 459, 441, 432, 423, 414, 405, 396, 378, 360, 351, 342, 333, 324, 315, 306, 297, 279, 261, 252, 243, 234, 225, 216, 207, 198, 180, 171, 162, 153, 144, 135, 126, 117, 108, 99, 81, 72, 63, 54, 45, 36, 27, 18, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2010, based on a suggestion from Chris Cole

Keywords

Crossrefs

Programs

  • Maple
    f:=proc(n) global S; option remember; if n=1 then RETURN(S) else RETURN(f(n-1)-digsum(f(n-1))); fi; end; S:=1000; [seq(f(n),n=1..120)];
  • Mathematica
    NestList[#-Total[IntegerDigits[#]]&,1000,100] (* Harvey P. Dale, Mar 28 2020 *)

A230286 a(n) = A016052(n)/3.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 13, 17, 19, 23, 28, 32, 37, 38, 40, 41, 43, 47, 49, 53, 58, 62, 67, 68, 70, 71, 73, 77, 79, 83, 88, 92, 97, 101, 103, 107, 109, 113, 118, 122, 127, 131, 136, 140, 142, 146, 151, 155, 160, 164
Offset: 1

Views

Author

Keywords

Comments

a(1) = 1; for n >= 1, a(n+1) = a(n) + sum of its digits.

Crossrefs

Cf. A004207, A016052, A230287 (first differences).

Programs

  • Haskell
    a230286 = (flip div 3) . a016052
Previous Showing 21-30 of 66 results. Next