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

A028838 Numbers whose sum of digits is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 11, 13, 17, 20, 22, 26, 31, 35, 40, 44, 53, 62, 71, 79, 80, 88, 97, 100, 101, 103, 107, 110, 112, 116, 121, 125, 130, 134, 143, 152, 161, 169, 170, 178, 187, 196, 200, 202, 206, 211, 215, 220, 224, 233, 242, 251, 259, 260, 268, 277, 286, 295, 301, 305, 310, 314, 323, 332, 341
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [k: k in [2..341] | PrimeDivisors(&+Intseq(k)) eq [2] or &+Intseq(k) eq 1]; // Marius A. Burtea, Jun 11 2019
    
  • Mathematica
    Select[Range[400],IntegerQ[Log2[Total[IntegerDigits[#]]]]&] (* Harvey P. Dale, Jul 22 2023 *)
  • PARI
    ispp(n) = (n==1) || (isprimepower(n, &p) && (p==2));
    isok(n) = ispp(sumdigits(n)); \\ Michel Marcus, Jun 11 2019

Extensions

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

A028889 Numbers whose iterated product of digits is a power of 2.

Original entry on oeis.org

1, 2, 4, 8, 11, 12, 14, 18, 21, 22, 24, 26, 27, 29, 34, 36, 37, 38, 39, 41, 42, 43, 46, 49, 62, 63, 64, 66, 67, 72, 73, 76, 77, 79, 81, 83, 88, 89, 92, 93, 94, 97, 98, 99, 111, 112, 114, 118, 121, 122, 124, 126, 127, 129, 134, 136, 137, 138, 139, 141, 142, 143, 146, 149, 162, 163, 164, 166, 167
Offset: 1

Views

Author

Keywords

Examples

			38 -> 3*8 = 24 -> 2*4 = 8 = 2^3.
		

Crossrefs

Programs

  • Mathematica
    p2Q[n_]:=IntegerQ[Log[2,NestWhile[Times@@IntegerDigits[#]&,n,#>9&]]]; Select[ Range[200],p2Q] (* Harvey P. Dale, Sep 19 2019 *)

Extensions

Extended (and corrected) by Scott Lindhurst (ScottL(AT)alumni.princeton.edu)
Showing 1-2 of 2 results.