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.

A052216 Sums of two powers of 10.

Original entry on oeis.org

2, 11, 20, 101, 110, 200, 1001, 1010, 1100, 2000, 10001, 10010, 10100, 11000, 20000, 100001, 100010, 100100, 101000, 110000, 200000, 1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000, 10000001, 10000010, 10000100, 10001000, 10010000, 10100000, 11000000, 20000000
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

Numbers whose digit sum is 2.
A007953(a(n)) = 2; number of repdigits = #{2,11} = A242627(2) = 2. - Reinhard Zumkeller, Jul 17 2014
By extension, numbers k such that digitsum(k)^2 - 1 is prime. (PROOF: For any number k whose digit sum d > 2, d^2 - 1 = (d+1)*(d-1) and thus is not prime.) - Christian N. K. Anderson, Apr 22 2024

Examples

			From _Bruno Berselli_, Mar 07 2013: (Start)
The triangular array starts (see formula):
        2;
       11,      20;
      101,     110,     200;
     1001,    1010,    1100,    2000;
    10001,   10010,   10100,   11000,   20000;
   100001,  100010,  100100,  101000,  110000,  200000;
  1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000;
  ...
(End)
		

Crossrefs

Subsequence of A069263 and A107679. A038444 is a subsequence.
Sums of n powers of 10: A011557 (1), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052216 n = a052216_list !! (n-1)
    a052216_list = 2 : f [2] 9 where
       f xs@(x:_) z = ys ++ f ys (10 * z) where
                      ys = (x + z) : map (* 10) xs
    -- Reinhard Zumkeller, Jan 28 2015, Jul 17 2014
    
  • Magma
    [n: n in [1..10100000] | &+Intseq(n) eq 2]; // Vincenzo Librandi, Mar 07 2013
    
  • Magma
    /* As a triangular array: */ [[10^n+10^m: m in [0..n]]: n in [0..8]]; // Bruno Berselli, Mar 07 2013
    
  • Mathematica
    t = 10^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
    With[{nn=7},Sort[Join[Table[FromDigits[PadRight[{2},n,0]],{n,nn}], FromDigits/@Flatten[Table[Table[Insert[PadRight[{1},n,0],1,i]],{n,nn},{i,2,n+1}],1]]]] (* Harvey P. Dale, Nov 15 2011 *)
    Select[Range[10^9], Total[IntegerDigits[#]] == 2&] (* Vincenzo Librandi, Mar 07 2013 *)
    T[n_,k_]:=10^(n-1)+10^(k-1); Table[T[n,k],{n,8},{k,n}]//Flatten (* Stefano Spezia, Nov 03 2023 *)
  • PARI
    a(n)=my(d=(sqrtint(8*n)-1)\2,t=n-d*(d+1)/2-1); 10^d + 10^t \\ Charles R Greathouse IV, Dec 19 2016
    
  • Python
    from itertools import count, islice
    def agen(): yield from (10**i + 10**j for i in count(0) for j in range(i+1))
    print(list(islice(agen(), 34))) # Michael S. Branicky, May 15 2022
    
  • Python
    from math import isqrt
    def A052216(n): return 10**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+10**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 08 2025
    
  • SageMath
    def A052216(n,k): return 10^(n-1) + 10^(k-1)
    flatten([[A052216(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Feb 22 2024

Formula

T(n,k) = 10^(n-1) + 10^(k-1) with 1 <= k <= n.
a(n) = 3*A237424(n) - 1. - Reinhard Zumkeller, Jan 28 2015
a(n) = 10^A003056(n-1) + 10^A002262(n-1). - Chai Wah Wu, Apr 08 2025

A159463 Numbers n with property that sod(n^3) = 6^3.

Original entry on oeis.org

3848163483, 4462569999, 4479677412, 4586158119, 4594661259, 4594665192, 4594700889, 4625720379, 4641588459, 5644008999, 5828410842, 5833034823, 5838252576, 5848025709, 6453471192, 6617331999, 6619097067, 6686657169, 7107126942, 7230291999, 7277907183
Offset: 1

Views

Author

Zak Seidov, Apr 12 2009

Keywords

Comments

Numbers n with property that A007953(n^3) = 6^3.

Examples

			3848163483^3 = 56984998629886989599887999587, 5+6+9+8+4+9+9+8+6+2+9+8+8+6+9+8+9+5+9+9+8+8+7+9+9+9+5+8+7 = 216 = 6^3.
		

Crossrefs

Cf. A054966 Numbers that are congruent to {0, 1, 8} mod 9. A054966 Possible sums of digits of cubes. A067075 a(n) = smallest number m such that the sum of the digits of m^3 is equal to n^3. A007953 Digital sum (i.e., sum of digits) of n.
Numbers n such that sum of digits of n^3 is k^3: A107679 (k=2), A290842 (k=3), A290843 (k=4), A159462 (k=5), this sequence (k=6).

Extensions

a(16)-a(21) from Seiichi Manyama, Aug 12 2017

A290843 Numbers k such that the sum of digits of k^3 is 4^3 = 64.

Original entry on oeis.org

1192, 1366, 1426, 1435, 1753, 1786, 1813, 1816, 1912, 1942, 1999, 2116, 2389, 2395, 2398, 2413, 2566, 2599, 2632, 2635, 2653, 2692, 2713, 2872, 2899, 2992, 3022, 3031, 3103, 3199, 3289, 3295, 3298, 3301, 3355, 3361, 3382, 3394, 3409, 3415, 3442, 3466, 3475
Offset: 1

Views

Author

Seiichi Manyama, Aug 12 2017

Keywords

Examples

			1192^3 = 1693669888, 1 + 6 + 9 + 3 + 6 + 6 + 9 + 8 + 8 + 8 = 64 = 4^3.
11*(10^(n+2) + 1) is a term for all n > 0. - _Altug Alkan_, Aug 12 2017
		

Crossrefs

Numbers k such that sum of digits of k^3 is m^3: A107679 (m=2), A290842 (m=3), this sequence (m=4), A159462 (m=5), A159463 (m=6).
Cf. A067075.

Programs

  • Mathematica
    Select[Range[3500],Total[IntegerDigits[#^3]]==64&] (* Harvey P. Dale, Aug 04 2019 *)
  • PARI
    isok(n) = sumdigits(n^3) == 64; \\ Altug Alkan, Aug 12 2017

A290842 Numbers k such that the sum of digits of k^3 is 3^3 = 27.

Original entry on oeis.org

27, 33, 36, 39, 42, 54, 57, 69, 72, 75, 78, 84, 87, 93, 105, 108, 111, 114, 135, 138, 147, 162, 165, 168, 174, 177, 219, 222, 225, 228, 231, 234, 258, 267, 270, 273, 276, 285, 291, 294, 312, 318, 321, 330, 342, 345, 348, 351, 360, 369, 381, 384, 390, 405, 417
Offset: 1

Views

Author

Seiichi Manyama, Aug 12 2017

Keywords

Comments

It is obvious that if k is in this sequence, then so is 10*k. Additionally, this sequence contains other infinite subsequences. For example, 10^(2*k) + 10^k + 1 is in this sequence for all k > 0. - Altug Alkan, Aug 12 2017

Examples

			27^3 = 19683, 1 + 9 + 6 + 8 + 3 = 27 = 3^3.
		

Crossrefs

Numbers k such that sum of digits of k^3 is m^3: A107679 (m=2), this sequence (m=3), A290843 (m=4), A159462 (m=5), A159463 (m=6).
Cf. A067075.

Programs

  • PARI
    isok(n) = sumdigits(n^3) == 27; \\ Altug Alkan, Aug 12 2017
Showing 1-4 of 4 results.