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-10 of 17 results. Next

A038445 Sums of 3 distinct powers of 10.

Original entry on oeis.org

111, 1011, 1101, 1110, 10011, 10101, 10110, 11001, 11010, 11100, 100011, 100101, 100110, 101001, 101010, 101100, 110001, 110010, 110100, 111000, 1000011, 1000101, 1000110, 1001001, 1001010, 1001100, 1010001, 1010010, 1010100, 1011000, 1100001, 1100010, 1100100
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[10^Range[0, 6], {3}]] (* Amiram Eldar, Jul 12 2022 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A038445(n): return 10**((r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))+10**((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+10**(m+t+1) # Chai Wah Wu, Mar 10 2025

A038452 Sums of 10 distinct powers of 10.

Original entry on oeis.org

1111111111, 10111111111, 11011111111, 11101111111, 11110111111, 11111011111, 11111101111, 11111110111, 11111111011, 11111111101, 11111111110, 100111111111, 101011111111, 101101111111, 101110111111, 101111011111, 101111101111, 101111110111, 101111111011, 101111111101
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Take[Union[Total/@Subsets[10^Range[0,15],{10}]],20] (* Harvey P. Dale, Dec 19 2011 *)
  • Python
    from itertools import islice
    def A038452_gen(): # generator of terms
        yield int(bin(n:=1023)[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:])
    A038452_list = list(islice(A038452_gen(),20)) # Chai Wah Wu, Mar 10 2025

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A038448 Sums of 6 distinct powers of 10.

Original entry on oeis.org

111111, 1011111, 1101111, 1110111, 1111011, 1111101, 1111110, 10011111, 10101111, 10110111, 10111011, 10111101, 10111110, 11001111, 11010111, 11011011, 11011101, 11011110, 11100111, 11101011, 11101101, 11101110, 11110011, 11110101, 11110110, 11111001, 11111010
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[10^Range[0, 7], {6}]] (* Amiram Eldar, Jul 12 2022 *)
  • Python
    from itertools import islice
    def A038448_gen(): # generator of terms
        yield int(bin(n:=63)[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:])
    A038448_list = list(islice(A038448_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset corrected by Amiram Eldar, Jul 12 2022

A038449 Sums of 7 distinct powers of 10.

Original entry on oeis.org

1111111, 10111111, 11011111, 11101111, 11110111, 11111011, 11111101, 11111110, 100111111, 101011111, 101101111, 101110111, 101111011, 101111101, 101111110, 110011111, 110101111, 110110111, 110111011, 110111101, 110111110, 111001111, 111010111, 111011011, 111011101
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Take[Total/@Subsets[10^Range[0,20],{7}]//Union,20] (* Harvey P. Dale, Feb 25 2018 *)
  • Python
    from itertools import islice
    def A038449_gen(): # generator of terms
        yield int(bin(n:=127)[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:])
    A038449_list = list(islice(A038449_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset corrected by Amiram Eldar, Jul 12 2022

A038453 Sums of 11 distinct powers of 10.

Original entry on oeis.org

11111111111, 101111111111, 110111111111, 111011111111, 111101111111, 111110111111, 111111011111, 111111101111, 111111110111, 111111111011, 111111111101, 111111111110, 1001111111111, 1010111111111, 1011011111111, 1011101111111, 1011110111111, 1011111011111, 1011111101111
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Total/@Subsets[10^Range[0,12],{11}]] (* Harvey P. Dale, Jan 20 2013 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (hammingweight(n) == 11, print1(subst(Pol(binary(n)), x, 10), ", ");););} \\ Michel Marcus, Feb 29 2016
    
  • Python
    from itertools import islice
    def A038453_gen(): # generator of terms
        yield int(bin(n:=2047)[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:])
    A038453_list = list(islice(A038453_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A038454 Sums of 12 distinct powers of 10.

Original entry on oeis.org

111111111111, 1011111111111, 1101111111111, 1110111111111, 1111011111111, 1111101111111, 1111110111111, 1111111011111, 1111111101111, 1111111110111, 1111111111011, 1111111111101, 1111111111110, 10011111111111, 10101111111111, 10110111111111, 10111011111111, 10111101111111
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    N:= 14: # to get all terms of at most N digits
    sort(map(t -> (10^N-1)/9 - add(10^j, j=t),
    combinat:-choose([$0..N-1],N-12))); # Robert Israel, Feb 28 2016
  • Mathematica
    Sort[Plus @@@ Subsets[10^Range[0, 12], {12}]] (* Amiram Eldar, Jul 12 2022 *)
  • Python
    from itertools import islice
    def A038454_gen(): # generator of terms
        yield int(bin(n:=4095)[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:])
    A038454_list = list(islice(A038454_gen(),20)) # Chai Wah Wu, Mar 11 2025

Formula

a(binomial(N,12)+k) = 10^N + A038453(k) for 1 <= k <= binomial(N,11). - Robert Israel, Feb 28 2016

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A038450 Sums of 8 distinct powers of 10.

Original entry on oeis.org

11111111, 101111111, 110111111, 111011111, 111101111, 111110111, 111111011, 111111101, 111111110, 1001111111, 1010111111, 1011011111, 1011101111, 1011110111, 1011111011, 1011111101, 1011111110, 1100111111, 1101011111, 1101101111, 1101110111, 1101111011, 1101111101
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Sort[FromDigits/@Permutations[{1,1,1,1,1,1,1,1,0,0}]] (* Harvey P. Dale, Apr 29 2013 *)
  • Python
    from itertools import islice
    def A038450_gen(): # generator of terms
        yield int(bin(n:=255)[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:])
    A038450_list = list(islice(A038450_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset corrected by Amiram Eldar, Jul 12 2022

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

A157711 Primes made up of 0's and four 1's only.

Original entry on oeis.org

10111, 1011001, 1100101, 10010101, 10100011, 101001001, 1000001011, 1000010101, 1010000011, 1100010001, 10000001101, 10001000011, 10001001001, 10001100001, 10100000011, 10100001001, 11000000101, 11001000001
Offset: 1

Views

Author

Lekraj Beedassy, Mar 04 2009

Keywords

Comments

Intersection of A062339 and A020449. Subsequence of A235154. - Felix Fröhlich, Nov 19 2014
Primes that are the sum of four distinct powers of ten (A038446). - Jeppe Stig Nielsen, May 18 2023

Crossrefs

Cf. A020449, A038446, A062339, A235154, A383675 (number of n-digit terms).

Programs

  • Maple
    for d from 4 to 18 do for c from 0 to 2^d-1 do bdgs := convert(c,base,2) ; if add(i,i=bdgs) = 3 then p := 10^d+add(op(i,bdgs)*10^(i-1),i=1..nops(bdgs)) ; if isprime(p) then printf("%d,",p) ; fi; fi; od: od: # R. J. Mathar, Mar 06 2009
  • Mathematica
    Flatten[Select[FromDigits/@Permutations[Join[{1,1,1,1},PadRight[{},7,0]]],PrimeQ]] // Union (* Harvey P. Dale, May 09 2019 *)
  • PARI
    for(n=0, 10, forprime(p=10^n, (10^(n+1)-1)/9, if(vecmax(digits(p))==1, if(sumdigits(p)==4, print1(p, ", "))))) \\ Felix Fröhlich, Nov 19 2014
    
  • PARI
    my(M=20);for(i=3, M, for(j=2,i-1, for(k=1, j-1, my(p=10^i+10^j+10^k+1); isprime(p)&&print1(p,", ")))) \\ Jeppe Stig Nielsen, May 18 2023

Extensions

Extended by numerous authors, Mar 06 2009

A038466 Sums of 4 distinct powers of 3.

Original entry on oeis.org

40, 94, 112, 118, 120, 256, 274, 280, 282, 328, 334, 336, 352, 354, 360, 742, 760, 766, 768, 814, 820, 822, 838, 840, 846, 976, 982, 984, 1000, 1002, 1008, 1054, 1056, 1062, 1080, 2200, 2218, 2224, 2226, 2272, 2278, 2280, 2296, 2298, 2304, 2434, 2440, 2442, 2458
Offset: 1

Views

Author

Keywords

Crossrefs

Base 3 interpretation of A038446.

Programs

  • Mathematica
    Sort[Plus @@@ Subsets[3^Range[0, 7], {4}]] (* Amiram Eldar, Jul 13 2022 *)
  • Python
    from itertools import islice
    def A038466_gen(): # generator of terms
        yield int(bin(n:=15)[2:],3)
        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:],3)
    A038466_list = list(islice(A038466_gen(),30)) # Chai Wah Wu, Apr 04 2025

Extensions

Offset corrected by Amiram Eldar, Jul 13 2022
Showing 1-10 of 17 results. Next