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

A038451 Sums of 9 distinct powers of 10.

Original entry on oeis.org

111111111, 1011111111, 1101111111, 1110111111, 1111011111, 1111101111, 1111110111, 1111111011, 1111111101, 1111111110, 10011111111, 10101111111, 10110111111, 10111011111, 10111101111, 10111110111, 10111111011
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[10^Range[0, 10], {9}]] (* Amiram Eldar, Jul 12 2022 *)
  • Python
    from itertools import islice
    def A038451_gen(): # generator of terms
        yield int(bin(n:=511)[2:])
        while True: yield int(bin((n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b))[2:])
    A038451_list = list(islice(A038451_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset corrected by Amiram Eldar, Jul 12 2022

A278937 Numbers k such that 3 is the largest decimal digit of k^3.

Original entry on oeis.org

11, 101, 110, 1001, 1010, 1100, 10001, 10010, 10100, 11000, 100001, 100010, 100100, 101000, 110000, 684917, 1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 6849170, 10000001, 10000010, 10000100, 10001000, 10010000, 10100000, 11000000
Offset: 1

Views

Author

Colin Barker, Dec 02 2016

Keywords

Comments

A038444 is a subsequence. Are there an infinite number of terms not in A038444 that are not a multiple of 10? - Chai Wah Wu, Dec 02 2016
Conjecture: sequence is equal to A038444 plus terms of the form 684917*10^k for k >= 0. - Chai Wah Wu, Sep 02 2017
Conjecture is true up to 4.8*10^18. - Giovanni Resta, Sep 03 2017

Examples

			684917 is in the sequence because 684917^3 = 321302302131323213.
		

Crossrefs

Cf. A000578 (the cubes: n^3), A038444, A277960 (analog for squares), A278936 (cubes of the terms: a(n)^3).
Cf. A031997 (the odd terms).

Programs

  • Magma
    [n: n in [1..2*10^7] | Max(Intseq(n^3)) eq 3]; // Vincenzo Librandi, Dec 03 2016
  • Mathematica
    Select[Range[11 10^6],Max[IntegerDigits[#^3]]==3&] (* Harvey P. Dale, Feb 11 2025 *)
  • PARI
    select(n->vecmax(digits(n^3))==3, vector(1000000, n, n))
    

Formula

a(n)^3 = A278936(n).

A046851 Numbers n such that n^2 can be obtained from n by inserting internal (but not necessarily contiguous) digits.

Original entry on oeis.org

0, 1, 10, 11, 95, 96, 100, 101, 105, 110, 125, 950, 960, 976, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011, 1021, 1025, 1026, 1036, 1046, 1050, 1100, 1101, 1105, 1201, 1205, 1250, 1276, 1305, 1316, 1376, 1405, 9500, 9505, 9511, 9525, 9600, 9605, 9625
Offset: 1

Views

Author

Keywords

Comments

Contains A038444. In particular, the sequence is infinite. - Robert Israel, Oct 20 2016
If n is any positive term, then b_n(k) := n*10^k (k >= 0) is an infinite subsequence. - Rick L. Shepherd, Nov 01 2016
From Robert Israel's comment it follows that the subsequence of terms with no trailing zeros is also infinite (contains A000533). - Rick L. Shepherd, Nov 01 2016

Examples

			110^2 = 12100 (insert "2" and "0" into "1_1_0").
		

Crossrefs

Cf. A045953, A008851, A018834, A038444, A086457 (subsequence).

Programs

  • Haskell
    import Data.List (isInfixOf)
    a046851 n = a046851_list !! (n-1)
    a046851_list = filter chi a008851_list where
       chi n = (x == y && xs `isSub` ys) where
          x:xs = show $ div n 10
          y:ys = show $ div (n^2) 10
       isSub [] ys       = True
       isSub _  []       = False
       isSub us'@(u:us) (v:vs)
             | u == v    = isSub us vs
             | otherwise = isSub us' vs
    -- Reinhard Zumkeller, Jul 27 2011
  • Maple
    IsSublist:= proc(a, b)
      local i,bp,j;
      bp:= b;
      for i from 1 to nops(a) do
        j:= ListTools:-Search(a[i],bp);
        if j = 0 then return false fi;
        bp:= bp[j+1..-1];
      od;
      true
    end proc:
    filter:= proc(n) local A,B;
      A:= convert(n,base,10);
      B:= convert(n^2,base,10);
      if not(A[1] = B[1] and A[-1] = B[-1]) then return false fi;
      if nops(A) <= 2 then return true fi;
      IsSublist(A[2..-2],B[2..-2])
    end proc:
    select(filter, [$0..10^4]); # Robert Israel, Oct 20 2016
  • Mathematica
    id[n_]:=IntegerDigits[n];
    insQ[n_]:=First[id[n]]==First[id[n^2]]&&Last[id[n]]==Last[id[n^2]];
    sort[n_]:=Flatten/@Table[Position[id[n^2],id[n][[i]]],{i,1,Length[id[n]]}];
    takeQ[n_]:=Module[{lst={First[sort[n][[1]]]}},
       Do[
        Do[
         If[Last[lst]Ivan N. Ianakiev, Oct 19 2016 *)

A066884 Square array read by upward antidiagonals where the n-th row contains the positive integers with n binary 1's.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 15, 11, 6, 8, 31, 23, 13, 9, 16, 63, 47, 27, 14, 10, 32, 127, 95, 55, 29, 19, 12, 64, 255, 191, 111, 59, 30, 21, 17, 128, 511, 383, 223, 119, 61, 39, 22, 18, 256, 1023, 767, 447, 239, 123, 62, 43, 25, 20, 512, 2047, 1535, 895, 479, 247, 125, 79, 45, 26, 24, 1024
Offset: 1

Views

Author

Jared Benjamin Ricks (jaredricks(AT)yahoo.com), Jan 21 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A067587.

Examples

			Column: 1   2   3   4   5   6
-----------------------------
Row 1:| 1   2   4   8  16  32
Row 2:| 3   5   6   9  10  12
Row 3:| 7  11  13  14  19  21
Row 4:|15  23  27  29  30  39
Row 5:|31  47  55  59  61  62
Row 6:|63  95 111 119 123 125
		

Crossrefs

Selected rows: A000079 (1), A018900 (2), A014311 (3), A014312 (4), A014313 (5), A023688 (6), A023689 (7), A023690 (8), A023691 (9), A038461 (10), A038462 (11), A038463 (12). For decimal analogs, see A011557 and A038444-A038452.
Selected columns: A000225 (1), A055010 (2).
Selected diagonals: A036563 (main), A000918 (1st upper), A153894 (2nd upper). [Franklin T. Adams-Watters, Apr 22 2009]
Cf. A067576 (the same array read by downward antidiagonals).
Antidiagonal sums give A361074.

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, Last[ Take[ Take[ Select[ Range[2^12], Count[ IntegerDigits[ #, 2], 1] == j - i + 1 & ], j], i]]], {j, 1, 11}, {i, 1, j}]; a

Extensions

Corrected and extended by Henry Bottomley, Jan 27 2002

A038470 Sums of 2 distinct powers of 4.

Original entry on oeis.org

5, 17, 20, 65, 68, 80, 257, 260, 272, 320, 1025, 1028, 1040, 1088, 1280, 4097, 4100, 4112, 4160, 4352, 5120, 16385, 16388, 16400, 16448, 16640, 17408, 20480, 65537, 65540, 65552, 65600, 65792, 66560, 69632, 81920, 262145, 262148, 262160, 262208, 262400, 263168
Offset: 1

Views

Author

Keywords

Crossrefs

Base-4 interpretation of A038444.

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[4^Range[0, 9], {2}]] (* Amiram Eldar, Jul 13 2022 *)
  • Python
    def aupto(limit):
      p = [4**i for i in range(limit//4+1) if 4**i < limit]
      p2 = set(a+b for i, a in enumerate(p) for b in p[i+1:] if a+b <= limit)
      return sorted(p2)
    print(aupto(265000)) # Michael S. Branicky, May 17 2021
    
  • Python
    from math import isqrt
    def A038470(n): return (1<<(m:=isqrt(n<<3)+1&-2))+(1<<(n-1<<1)-((k:=m>>1)*(k-1))) # Chai Wah Wu, Apr 05 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022

A038474 Sums of two distinct powers of 5.

Original entry on oeis.org

6, 26, 30, 126, 130, 150, 626, 630, 650, 750, 3126, 3130, 3150, 3250, 3750, 15626, 15630, 15650, 15750, 16250, 18750, 78126, 78130, 78150, 78250, 78750, 81250, 93750, 390626, 390630, 390650, 390750, 391250, 393750, 406250, 468750, 1953126, 1953130, 1953150
Offset: 1

Views

Author

Keywords

Crossrefs

Base 5 interpretation of A038444.

Programs

  • Mathematica
    Union[Total/@Subsets[5^Range[0, 15], {2}]] (* Harvey P. Dale, Jan 06 2011 *)
  • Python
    from itertools import combinations, count, takewhile
    def aupto(lim):
      p = takewhile(lambda x: x<= lim, (5**i for i in count(0)))
      t = (sum(c) for c in combinations(p, 2))
      return sorted(filter(lambda x: x <= lim, t))
    print(aupto(10**6)) # Michael S. Branicky, Jun 26 2021
    
  • Python
    from math import isqrt
    def A038474(n): return 5**(m:=isqrt(n<<3)+1>>1)+5**(n-1-(m*(m-1)>>1)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset changed to 1 and a(37) and beyond from Michael S. Branicky, Jun 26 2021

A309761 Numbers that are sums of consecutive powers of 10.

Original entry on oeis.org

1, 10, 11, 100, 110, 111, 1000, 1100, 1110, 1111, 10000, 11000, 11100, 11110, 11111, 100000, 110000, 111000, 111100, 111110, 111111, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 1111111, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 15 2019

Keywords

Comments

Numbers of the form (10^i - 10^j)/9 with i > j.

Examples

			11100 = 10^2 + 10^3 + 10^4, so 11100 is in the sequence.
		

Crossrefs

Programs

  • Maple
    seq(seq((10^i-10^(i-j))/9, j=1..i),i=1..10); # Robert Israel, Aug 16 2019
  • Python
    from math import isqrt
    def A309761(n): return (10**(m:=isqrt(n<<3)+1>>1)-10**(m*(m+1)-(n<<1)>>1))//9 # Chai Wah Wu, Apr 04 2025

Formula

a(n) = A007088(A023758(n+1)).
a(i*(i-1)/2 + j) = (10^i - 10^(i-j))/9 for 1<=j<=i. - Robert Israel, Aug 16 2019
a(n) = A276349(n)/10. - Chai Wah Wu, Jun 16 2025

A038478 Sums of 2 distinct powers of 6.

Original entry on oeis.org

7, 37, 42, 217, 222, 252, 1297, 1302, 1332, 1512, 7777, 7782, 7812, 7992, 9072, 46657, 46662, 46692, 46872, 47952, 54432, 279937, 279942, 279972, 280152, 281232, 287712, 326592, 1679617, 1679622, 1679652, 1679832, 1680912, 1687392, 1726272, 1959552, 10077697, 10077702
Offset: 1

Views

Author

Keywords

Crossrefs

Base-6 interpretation of A038444.

Programs

  • Mathematica
    Total/@Subsets[6^Range[0,10],{2}]//Union (* Harvey P. Dale, Aug 11 2018 *)
  • Python
    from math import isqrt
    def A038478(n): return 6**(m:=isqrt(n<<3)+1>>1)+6**(n-1-(m*(m-1)>>1)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 14 2022

A038481 Sums of 2 distinct powers of 7.

Original entry on oeis.org

8, 50, 56, 344, 350, 392, 2402, 2408, 2450, 2744, 16808, 16814, 16856, 17150, 19208, 117650, 117656, 117698, 117992, 120050, 134456, 823544, 823550, 823592, 823886, 825944, 840350, 941192, 5764802, 5764808, 5764850, 5765144, 5767202
Offset: 0

Views

Author

Keywords

Crossrefs

Base 7 interpretation of A038444.

Programs

  • Maple
    seq(seq(7^i+7^j,j=0..i-1),i=1..10); # Robert Israel, Feb 09 2018
  • Mathematica
    Sort[Total/@Subsets[7^Range[0,10],{2}]] (* Harvey P. Dale, Jul 29 2015 *)
  • Python
    from math import isqrt
    def A038481(n): return 7**(m:=isqrt(n<<3)+1>>1)+7**(n-1-(m*(m-1)>>1)) # Chai Wah Wu, Apr 05 2025

Formula

G.f.: ((1-x)*(1-7*x))^(-1) * (2 - 8*x + sum_{k>=0} ((1+5*7^k)*x^(k*(k+1)/2) + (1+41*7^k)*x^(1+k*(k+1)/2))). - Robert Israel, Feb 09 2018

A038484 Sums of 2 distinct powers of 8.

Original entry on oeis.org

9, 65, 72, 513, 520, 576, 4097, 4104, 4160, 4608, 32769, 32776, 32832, 33280, 36864, 262145, 262152, 262208, 262656, 266240, 294912, 2097153, 2097160, 2097216, 2097664, 2101248, 2129920, 2359296, 16777217, 16777224, 16777280, 16777728, 16781312, 16809984, 17039360, 18874368
Offset: 1

Views

Author

Keywords

Crossrefs

Base-8 interpretation of A038444.

Programs

  • Mathematica
    Total/@Subsets[8^Range[0,10],{2}]//Union (* Harvey P. Dale, Jul 04 2022 *)
  • Python
    from math import isqrt
    def A038484(n): return (1<<(a:=isqrt(n<<3)+1&-2)+(m:=a>>1))+(1<<3*(n-1-(m*(m-1)>>1))) # Chai Wah Wu, Apr 04 2025

Extensions

More terms from Vincenzo Librandi, Aug 06 2009
Offset corrected by Amiram Eldar, Jul 14 2022
Previous Showing 11-20 of 26 results. Next