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 61 results. Next

A180516 Numbers of the form i*4^j-1 (i=1..3, j >= 0).

Original entry on oeis.org

0, 1, 2, 3, 7, 11, 15, 31, 47, 63, 127, 191, 255, 511, 767, 1023, 2047, 3071, 4095, 8191, 12287, 16383, 32767, 49151, 65535, 131071, 196607, 262143, 524287, 786431, 1048575, 2097151, 3145727, 4194303, 8388607, 12582911, 16777215, 33554431, 50331647, 67108863, 134217727, 201326591, 268435455, 536870911, 805306367, 1073741823, 2147483647, 3221225471
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2011

Keywords

Crossrefs

Smallest number whose base b sum of digits is n: A000225 (b=2), A062318 (b=3), this sequence (b=4), A181287 (b=5), A181288 (b=6), A181303 (b=7), A165804 (b=8), A140576 (b=9), A051885 (b=10). - Jason Kimberley, Nov 02 2011

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 4, -4}, Range[0, 3], 50] (* Paolo Xausa, Aug 27 2024 *)

Formula

From Colin Barker, Feb 01 2013: (Start)
a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4).
G.f.: x^2*(x^2+x+1) / ((x-1)*(4*x^3-1)). (End)

A228915 Next larger integer with same digital sum (that is, sum of digits in base 10) as n.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 100, 20, 21, 22, 23, 24, 25, 26, 27, 28, 101, 30, 31, 32, 33, 34, 35, 36, 37, 38, 102, 40, 41, 42, 43, 44, 45, 46, 47, 48, 103, 50, 51, 52, 53, 54, 55, 56, 57, 58, 104, 60, 61, 62, 63, 64, 65, 66, 67, 68, 105, 70, 71, 72
Offset: 1

Views

Author

Paul Tek, Sep 08 2013

Keywords

Comments

This is a variant of A057168 for the base 10.
All integers except those in A051885 appear in this sequence.
n+9 <= a(n) <= 10*n, for any n > 0.
a(n)-n is a multiple of 9, for any n > 0.

Examples

			To compute a(n):
(1) Choose the rightmost digit D of n strictly less than 9 and with at least one nonzero digit after it (note that D may be a leading zero),
(2) Increment D,
(3) Replace the digits after D by A051885((sum of the digits after D) - 1), left padded with zeros.
For n = 2930:
(1) We choose the 4th digit,
(2) We increment the 4th digit,
(3) We replace the last 3 digits with "029" (= A051885((9+3+0)-1) left padded with zeros to 3 digits).
Hence, a(2930) = 3029.
		

Crossrefs

Programs

  • Mathematica
    nli[n_]:=Module[{k=n+1,s=Total[IntegerDigits[n]]},While[Total[ IntegerDigits[ k]] !=s, k++]; k]; Array[nli,70] (* Harvey P. Dale, Sep 27 2016 *)
  • PARI
    See Link section.
    
  • PARI
    A228915(n,p=1,d,r)={while(8<(d=n%10) || !r, n\=10; r+=d; p*=10); n*p+p+A051885(r-1)} \\ (Based on the above program.) - M. F. Hasler, Mar 15 2022
    
  • Python
    def A228915(n):
        p = r = 0
        while True:
            d = n % 10
            if d < 9 and r: return (n+1)*10**p+A051885(r-1)
            n //= 10; r += d; p += 1
    # (Based on Tek's PARI program.) - M. F. Hasler, Mar 15 2022

A054750 Smallest prime number whose digits sum to n-th prime.

Original entry on oeis.org

2, 3, 5, 7, 29, 67, 89, 199, 599, 2999, 4999, 29989, 59999, 79999, 389999, 989999, 6999899, 8989999, 59899999, 89999999, 289999999, 799999999, 3999998999, 19999997999, 79999999999, 399999998999, 599999899999, 999998999999
Offset: 1

Views

Author

G. L. Honaker, Jr., Apr 24 2000

Keywords

Comments

a(n) >= A051885(A000040(n)). Indices n for which the equality holds are listed in A055019.
a(n) >= A046864(n). - Michel Marcus, Nov 01 2015

Examples

			a(7)=89 because 8+9=17 and 17 is the 7th prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=2}, While[DigitSum[k]!=Prime[n], k=NextPrime[k]]; k]; Array[a,15] (* Stefano Spezia, Mar 27 2025 *)
  • PARI
    a(n) = {my(k=2); my(p=prime(n)); while((sumdigits(k) != prime(n)), k=nextprime(k+1)); k;} \\ Michel Marcus, Nov 01 2015

Extensions

More terms from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 31 2000
Edited and extended by Robert G. Wilson v, Feb 26 2002

A108971 Lexicographically earliest sequence such that in decimal representation sums of digits of consecutive terms differ exactly by 1 or -1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 27 2005

Keywords

Comments

Permutation of the natural numbers with inverse A179977; A179978(n)=a(a(n)); A179979 gives fixed points: a(A179979(n))=A179979(n).
abs(A007953(a(n+1)) - A007953(a(n))) = 1.
A179987(n)=A007953(a(n)); A007953(a(A179988(n)))=n; a(A179988(n))=A051885(n+1). - Reinhard Zumkeller, Aug 09 2010, Jul 10 2011

Extensions

Comment corrected and extended by Reinhard Zumkeller, Aug 04 2010

A181287 Numbers of the form i*5^j-1 (i=1..4, j >= 0).

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 14, 19, 24, 49, 74, 99, 124, 249, 374, 499, 624, 1249, 1874, 2499, 3124, 6249, 9374, 12499, 15624, 31249, 46874, 62499, 78124, 156249, 234374, 312499, 390624, 781249, 1171874, 1562499, 1953124, 3906249, 5859374, 7812499, 9765624, 19531249, 29296874, 39062499, 48828124, 97656249, 146484374, 195312499
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2011

Keywords

Comments

Row numbers of Pascal's Triangle where none of the binomial coefficients in that row is divisible by 5. - Thomas M. Green, Apr 02 2013

Examples

			For n = 7, a(7) = 14 and the binomial coefficients in the 14th row of Pascal's Triangle are 1 14 91 364 1001 2002 3003 3432 3003 2002 1001 364 91 14 1 and none of the elements in that row is divisible by 5. - _Thomas M. Green_, Apr 05 2013
		

Crossrefs

Smallest number whose base b sum of digits is n: A000225 (b=2), A062318 (b=3), A180516 (b=4), this sequence (b=5), A181288 (b=6), A181303 (b=7), A165804 (b=8), A140576 (b=9), A051885 (b=10). - Jason Kimberley, Nov 02 2011

Formula

a(n) = a(n-1)+5*a(n-4)-5*a(n-5). G.f.: x^2*(x+1)*(x^2+1) / ((x-1)*(5*x^4-1)). [Colin Barker, Feb 01 2013]

A067075 a(n) is the smallest number m such that the sum of the digits of m^3 is equal to n^3.

Original entry on oeis.org

0, 1, 2, 27, 1192, 341075, 3848163483, 2064403725539899
Offset: 0

Views

Author

Amarnath Murthy, Jan 05 2002

Keywords

Comments

If n = 6*k, a(n) <= A002283(n^3/18). For example, a(6) = 3848163483 <= A002283(6^3/18) = 999999999999. - Seiichi Manyama, Aug 12 2017
a(n) >= ceiling(A051885(n^3)^(1/3)). For example a(7) >= ceiling(A051885(7^3)^(1/3)) = ceiling((2*10^38-1)^(1/3)) = 5848035476426 - David A. Corneth, Aug 23 2018
From Zhining Yang, Jun 20 2024: (Start)
a(8) <= 99995999799995999999999.
a(9) <= 999699989999999949999999999999999.
a(10) <= 199999999929999999999949999999999999999999999.
(End)

Examples

			a(3) = 27 as 27^3 = 19683 is the smallest cube whose digit sum = 27 = 3^3.
		

Crossrefs

Cf. A051885, A061912, A067074. Subsequence of A067177.

Programs

  • Mathematica
    Do[k = 1; While[Plus @@ IntegerDigits[k^3] != n^3, k++ ]; Print[k], {n, 1, 6}] (* Ryan Propper, Jul 07 2005 *)
  • PARI
    a(n) = my(k=0); while (sumdigits(k^3) != n^3, k++); k; \\ Seiichi Manyama, Aug 12 2017

Extensions

Corrected and extended by Ryan Propper, Jul 07 2005
a(0)=0 prepended by Seiichi Manyama, Aug 12 2017
a(7) from Zhining Yang, Jun 20 2024

A080151 Let m = Wonderful Demlo number A002477(n); a(n) = sum of digits of m.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 82, 85, 90, 97, 106, 117, 130, 145, 162, 163, 166, 171, 178, 187, 198, 211, 226, 243, 244, 247, 252, 259, 268, 279, 292, 307, 324, 325, 328, 333, 340, 349, 360, 373, 388, 405, 406, 409, 414, 421, 430, 441, 454, 469, 486, 487
Offset: 1

Views

Author

Eric W. Weisstein, Jan 31 2003

Keywords

Comments

Record values in A003132. - Reinhard Zumkeller, Jul 10 2011

Crossrefs

Programs

  • Haskell
    a n=(div n 9)*81+(mod n 9)^2
              A080151=map a [1..] \\ Chernin Nadav, Mar 06 2014
    
  • Maple
    f := n -> 9*n - 81*frac(1/9*n) + 81*frac(1/9*n)^2:
    map(f, [$1..100]); # Robert Israel, Aug 05 2019
  • Mathematica
    (* by direct counting *)
    Repunit[n_] := (-1 + 10^n)/9; A080151[n_]:=Plus @@ IntegerDigits[Repunit[n]^2];
    (* by the formula *)
    A080151[n_] := (9^2)*(n/9 - FractionalPart[n/9] + FractionalPart[n/9]^2)
    (* or alternatively *)
    A080151[n_] := 81*(Floor[n/9]+ FractionalPart[n/9]^2) (* Enrique Pérez Herrero, Nov 22 2009 *)
  • PARI
    vector(100, n, (n\9)*81+(n%9)^2) \\ Colin Barker, Mar 05 2014

Formula

a(n) = A007953(A002477(n)).
a(n) = sqrt( A080150(n) ).
a(n) = (9^2)*(n/9 - {n/9} + {n/9}^2) = 81*(floor(n/9) + {n/9}^2), where the symbol {n} means fractional part of n. - Enrique Pérez Herrero, Nov 22 2009
a(n) = A003132(A051885(n)). - Reinhard Zumkeller, Jul 10 2011
a(9*n + k) = 81*n + k^2, with k in range 0 to 9. - Enrique Pérez Herrero, Nov 05 2022
Empirical g.f.: x*(17*x^8 + 15*x^7 + 13*x^6 + 11*x^5 + 9*x^4 + 7*x^3 + 5*x^2 + 3*x + 1) / ((x-1)^2*(x^2+x+1)*(x^6+x^3+1)). - Colin Barker, Mar 05 2014
Empirical g.f. confirmed. - Robert Israel, Aug 05 2019

A140576 Numbers of the form i*9^j-1 (i=1..8, j >= 0).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 26, 35, 44, 53, 62, 71, 80, 161, 242, 323, 404, 485, 566, 647, 728, 1457, 2186, 2915, 3644, 4373, 5102, 5831, 6560, 13121, 19682, 26243, 32804, 39365, 45926, 52487, 59048, 118097, 177146, 236195, 295244, 354293, 413342, 472391, 531440, 1062881
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2011

Keywords

Comments

A base-9 analog of A051885.

Crossrefs

Smallest number whose base b sum of digits is n: A000225 (b=2), A062318 (b=3), A180516 (b=4), A181287 (b=5), A181288 (b=6), A181303 (b=7), A165804 (b=8), this sequence (b=9), A051885 (b=10). - Jason Kimberley, Nov 02 2011

Formula

G.f.: x^2*(x+1)*(x^2+1)*(x^4+1) / ((x-1)*(3*x^4-1)*(3*x^4+1)). [Colin Barker, Feb 01 2013]

A165804 Numbers of the form i*8^j-1 (i=1..7, j >= 0).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31, 39, 47, 55, 63, 127, 191, 255, 319, 383, 447, 511, 1023, 1535, 2047, 2559, 3071, 3583, 4095, 8191, 12287, 16383, 20479, 24575, 28671, 32767, 65535, 98303, 131071, 163839, 196607, 229375, 262143, 524287, 786431, 1048575, 1310719, 1572863, 1835007, 2097151
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2011

Keywords

Comments

Numbers whose sum of digits in base 8 sets a new record. - Harvey P. Dale, Jan 10 2024

Crossrefs

Smallest number whose base b sum of digits is n: A000225 (b=2), A062318 (b=3), A180516 (b=4), A181287 (b=5), A181288 (b=6), A181303 (b=7), this sequence (b=8), A140576 (b=9), A051885 (b=10). - Jason Kimberley, Nov 02 2011

Programs

  • Mathematica
    Sort[Flatten[Table[i 8^j-1,{i,1,7},{j,0,7}]]]  (* Harvey P. Dale, Feb 03 2011 *)

Formula

G.f.: x^2*(x^6+x^5+x^4+x^3+x^2+x+1) / ((x-1)*(8*x^7-1)). [Colin Barker, Feb 01 2013]

A181288 Numbers of the form i*6^j-1 (i=1..5, j >= 0).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 11, 17, 23, 29, 35, 71, 107, 143, 179, 215, 431, 647, 863, 1079, 1295, 2591, 3887, 5183, 6479, 7775, 15551, 23327, 31103, 38879, 46655, 93311, 139967, 186623, 233279, 279935, 559871, 839807, 1119743, 1399679, 1679615, 3359231, 5038847, 6718463, 8398079, 10077695, 20155391, 30233087
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2011

Keywords

Crossrefs

Smallest number whose base b sum of digits is n: A000225 (b=2), A062318 (b=3), A180516 (b=4), A181287 (b=5), this sequence (b=6), A181303 (b=7), A165804 (b=8), A140576 (b=9), A051885 (b=10). - Jason Kimberley, Nov 02 2011

Programs

  • Mathematica
    Union[Flatten[Table[i*6^j-1,{j,0,20},{i,5}]]] (* Harvey P. Dale, Nov 12 2012 *)

Formula

G.f.: x^2*(x^4+x^3+x^2+x+1) / ((x-1)*(6*x^5-1)). [Colin Barker, Feb 01 2013]
Previous Showing 11-20 of 61 results. Next