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-5 of 5 results.

A028846 Numbers whose product of digits is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 11, 12, 14, 18, 21, 22, 24, 28, 41, 42, 44, 48, 81, 82, 84, 88, 111, 112, 114, 118, 121, 122, 124, 128, 141, 142, 144, 148, 181, 182, 184, 188, 211, 212, 214, 218, 221, 222, 224, 228, 241, 242, 244, 248, 281, 282, 284, 288, 411, 412, 414, 418, 421, 422, 424, 428, 441, 442, 444, 448
Offset: 1

Views

Author

Keywords

Comments

Numbers using only digits 1, 2, 4, and 8. - Michel Lagneau, Dec 01 2010

Examples

			28 is in the sequence because 2*8 = 2^4. - _Michel Lagneau_, Dec 01 2010
		

Crossrefs

Programs

  • Haskell
    a028846 n = a028846_list !! (n-1)
    a028846_list = f [1] where
       f ds = foldr (\d v -> 10 * v + d) 0 ds : f (s ds)
       s [] = [1]; s (8:ds) = 1 : s ds; s (d:ds) = 2*d : ds
    -- Reinhard Zumkeller, Jan 13 2014
    
  • Mathematica
    Select[Range[1000], IntegerQ[Log[2, Times @@ (IntegerDigits[#])]] &] (* Michel Lagneau, Dec 01 2010 *)
  • PARI
    is(n)=#setminus(Set(digits(n)), [1,2,4,8])==0 \\ Charles R Greathouse IV, Apr 24 2025
  • Python
    from itertools import count, islice, product
    def agen(): yield from (int("".join(p)) for d in count(1) for p in product("1248", repeat=d))
    print(list(islice(agen(), 64))) # Michael S. Branicky, Aug 21 2022
    
  • Python
    def A028846(n):
        m = (k:=3*n+1).bit_length()-1>>1
        return sum(10**j<<((k-(1<<(m<<1)))//(3<<(j<<1))&3) for j in range(m)) # Chai Wah Wu, Jun 28 2025
    

Formula

Given a(0) = 0 and n = 4k - r, where 0 <= r <= 3, a(n) = 10*a(k-1) + 2^(3-r). - Clinton H. Dan, Aug 21 2022

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A068807 Primes whose sum of digits is a power of 2.

Original entry on oeis.org

2, 11, 13, 17, 31, 53, 71, 79, 97, 101, 103, 107, 211, 233, 251, 277, 349, 367, 431, 439, 457, 503, 521, 547, 619, 673, 691, 701, 709, 727, 853, 907, 1021, 1061, 1069, 1087, 1151, 1201, 1223, 1249, 1429, 1447, 1483, 1511, 1601, 1609, 1627, 1663, 1753, 1861, 1933, 1951, 2011, 2141
Offset: 1

Views

Author

Amarnath Murthy, Mar 06 2002

Keywords

Comments

Subsequence of primes of A028838. - Michel Marcus, Aug 19 2015

Crossrefs

Different from A178796.

Programs

  • Magma
    [p: p in PrimesUpTo(2200) | PrimeDivisors(s) eq [2] where s is &+Intseq(p)]; // Bruno Berselli, Dec 26 2012
    
  • Mathematica
    Select[ Prime@Range[ 300 ],IntegerQ[ Log[ 2,Plus@@IntegerDigits[ # ] ] ]& ] (* Ray Chandler, Dec 03 2009 *)
  • PARI
    lista(nn) = forprime (n=1, nn, sd = sumdigits(n); if (2^valuation(sd,2) == sd, print1(n, ", "))); \\ Michel Marcus, Aug 19 2015

Extensions

Extended by Ray Chandler, Dec 03 2009

A326833 Numbers whose sum of digits is a power of 10.

Original entry on oeis.org

1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91, 100, 109, 118, 127, 136, 145, 154, 163, 172, 181, 190, 208, 217, 226, 235, 244, 253, 262, 271, 280, 307, 316, 325, 334, 343, 352, 361, 370, 406, 415, 424, 433, 442, 451, 460, 505, 514, 523, 532, 541, 550, 604, 613
Offset: 1

Views

Author

Alois P. Heinz, Oct 20 2019

Keywords

Crossrefs

Subsequence of A326806.

Programs

  • Maple
    q:= n-> (m-> m>0 and m=10^ilog[10](m))(add(i, i=convert(n, base, 10))):
    select(q, [$1..1000])[];
  • PARI
    isok(n) = my(s=sumdigits(n), k); (s==1) || (s==10) || (ispower(s,,&k) && (k==10)); \\ Michel Marcus, Oct 21 2019

A028836 Iterated sum of digits of n is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 11, 13, 17, 19, 20, 22, 26, 28, 29, 31, 35, 37, 38, 40, 44, 46, 47, 49, 53, 55, 56, 58, 62, 64, 65, 67, 71, 73, 74, 76, 80, 82, 83, 85, 89, 91, 92, 94, 98, 100, 101, 103, 107, 109, 110, 112, 116, 118, 119, 121, 125, 127, 128, 130, 134, 136, 137, 139, 143, 145, 146, 148, 152, 154, 155
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

Conjectures from Colin Barker, Feb 10 2020: (Start)
G.f.: x*(1 + x + 2*x^2 + 4*x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
(End)
This g.f. follows from the observation that a(n+4) = a(n)+9 and this holds since the iterated sum of digits of N equals the iterated sum of digits of N+9. - Peter Bala, Feb 10 2020

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)
Checked by Neven Juric (neven.juric(AT)apis-it.hr), Feb 04 2008

A308163 Numbers for which the sum of the digits of any divisor is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 11, 13, 17, 22, 26, 31, 44, 53, 62, 71, 79, 88, 97, 101, 103, 107, 121, 143, 169, 187, 202, 206, 211, 233, 242, 251, 277, 286, 341, 349, 367, 404, 422, 431, 439, 457, 466, 484, 503, 521, 547, 583, 619, 673, 682, 691, 701, 709, 727, 781, 808, 844
Offset: 1

Views

Author

Marius A. Burtea, Jun 11 2019

Keywords

Comments

The prime numbers in A068807 belong to the sequence.

Examples

			Divisors(8) = {1, 2, 4, 8} with sums of digits respectively 1, 2, 4, 8, powers of 2.
Divisors(13) = {1, 13} with sums of digits 1 and 4, powers of 2 .
Divisors(286) = {1, 2, 11, 13, 22, 26, 143, 286} with sums of digits respectively 1, 2, 2, 4, 4, 8, 16, powers of 2.
		

Crossrefs

Programs

  • Magma
    sol:=[]; m:=1;for n in [1..850] do nr:=#[d: d in Divisors(n) | PrimeDivisors(&+Intseq(d)) eq [2]];  if nr eq #Divisors(n)-1 then sol[m]:=n; m:=m+1; end if; end for; sol;
    
  • PARI
    ispp(n) = (n==1) || (isprimepower(n, &p) && (p==2));
    isok(n) = fordiv(n, d, if (!ispp(sumdigits(d)), return (0))); return (1); \\ Michel Marcus, Jun 12 2019
Showing 1-5 of 5 results.