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

A386249 a(n) is the Hamming weight of A161792(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 6, 1, 1, 2, 1, 1, 2, 1, 1, 2, 6, 1, 1, 2, 1, 1, 2, 1, 1, 2, 6, 1, 14, 1, 2, 15, 1, 1, 2, 1, 1, 2, 6, 1, 1, 2, 1, 1, 2, 1, 1, 2, 6, 1, 1, 2, 1, 14, 1, 2, 1, 15, 1, 2, 6, 1, 1, 2, 1, 1, 2, 1, 19, 1, 2, 6, 1, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Rémy Sigrist, Jul 16 2025

Keywords

Comments

All terms appear infinitely many times: for any n > 0, A161792(n)*2^a(n) also belongs to A161792, say it equals A161792(m) for some m > n, so a(n) = a(m), and we can find as many other occurrences of a(n) as we want.

Examples

			a(35) = A000120(2985984) = 6.
		

Crossrefs

Programs

  • PARI
    { for (n = 1, oo, if (ispower(n, h = hammingweight(n)), print1 (h", "));); }

Formula

a(n) = A000120(A161792(n)).

Extensions

a(65) and beyond from Michael S. Branicky, Jul 21 2025 using A161792

A386248 a(n) is the unique integer k such that A161792(n) = k^A000120(A161792(n)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 6, 64, 128, 12, 256, 512, 24, 3, 1024, 2048, 48, 4096, 8192, 96, 16384, 32768, 192, 6, 65536, 131072, 384, 262144, 524288, 768, 1048576, 2097152, 1536, 12, 4194304, 3, 8388608, 3072, 3, 16777216, 33554432, 6144, 67108864, 134217728
Offset: 1

Views

Author

Rémy Sigrist, Jul 16 2025

Keywords

Examples

			For n = 11: A161792(11) = 144 = 12^2 = 12^A000120(144), so a(11) = 12.
		

Crossrefs

Programs

  • PARI
    { for (n = 1, 2^27, if (ispower(n, hammingweight(n), &r), print1 (r", "););); }

A256590 Base-2 Reacher numbers: numbers that are powers of the sum of their base-2 digits.

Original entry on oeis.org

0, 1, 81, 625, 7776, 16807, 46656, 59049, 1679616, 1475789056, 6975757441, 137858491849, 576650390625, 41426511213649, 2384185791015625, 150094635296999121, 10260628712958602189, 32768000000000000000, 243569224216081305397, 655360000000000000000
Offset: 1

Views

Author

Jeffrey Shallit, Apr 03 2015

Keywords

Comments

Named for fictional character Jack Reacher in the series of novels by Lee Child.
There are 2709 terms with 10,000 or fewer digits; a(2709) = 15402^2388. - Charles R Greathouse IV, Nov 26 2016

References

  • Lee Child, Bad Luck and Trouble, Delacorte Press, 2007. In this book, the main character, Jack Reacher, likes the number 81 because it is the square of the sum of its base-10 digits.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{wt = DigitCount[n, 2, 1]},
    Which[n <= 1, True, wt <= 1, False, True, IntegerQ@ Log[wt, n]]]; Select[Range[10^5], fQ] (* Michael De Vlieger, Apr 04 2015 *)
  • PARI
    is(n)= n<=1 || (ispower(n,,&r) && (r==hammingweight(n) || (r^ispower(n=hammingweight(n))==n && n>1))) \\ Michel Marcus and M. F. Hasler, Apr 04 2015
    
  • PARI
    list(lim)=my(v=List([0,1]),H,t); for(e=3,logint(lim\=1,3), for(b=2,min(solve(x=e,lim,x-e*log(x)/log(2)-1),sqrtnint(lim,e)), H=hammingweight(t=b^e); if(H>1 && b^valuation(H,b)==H, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Nov 26 2016

Extensions

a(1) prepended and a(14)-a(20) added by Hiroaki Yamanouchi, Apr 03 2015

A161793 If b(n) is the number of 0's in the binary representation of n, then the positive integer n is included if n = k^b(n), for some k = integer.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 9, 11, 13, 14, 16, 23, 25, 27, 29, 30, 32, 47, 55, 59, 61, 62, 64, 81, 95, 111, 119, 121, 123, 125, 126, 128, 191, 223, 239, 247, 251, 253, 254, 256, 343, 383, 447, 479, 495, 503, 507, 509, 510, 512, 767, 895, 959, 991, 1007, 1015, 1019, 1021
Offset: 1

Views

Author

Leroy Quet, Jun 19 2009

Keywords

Examples

			25 in binary is 11001, which has two 0's. Since 25 = 5^2, with an exponent of 2, then 25 is included in this sequence.
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Mar 14 2010

A285438 Perfect powers that are also the sum of two powers of a prime p.

Original entry on oeis.org

4, 8, 9, 16, 32, 36, 64, 128, 144, 256, 324, 512, 576, 1024, 2048, 2304, 2744, 2916, 4096, 8192, 9216, 16384, 26244, 32768, 36864, 65536, 131072, 147456, 236196, 262144, 524288, 589824, 941192, 1048576, 2097152, 2125764, 2359296, 4194304, 8388608, 9437184
Offset: 1

Views

Author

Michael Josephy, Apr 18 2017

Keywords

Comments

Integers n such that there exist integers i, j, k, m, p with i, j >= 0, m, k >= 2 and p prime, such that n = m^k = p^i + p^j.
These are numbers of the form 2^r = 2^(r-1) + 2^(r-1) when r >= 2, numbers of the form (3*2^r)^2 = 2^(2*r) + 2^(2*r+3) and numbers of the form (2*p^r)^k = p^(r*k) + p^(r*k+1) when p = 2^k - 1 is a Mersenne prime. [Edited by Jinyuan Wang, Nov 30 2019]
If n = p^i + p^j is a term with exactly two sets of integer solutions (p, i, j), where i <= j, then n must be 36 = 6^2 = 2^2 + 2^5 = 3^2 + 3^3 or of the form 2^k = 2^(k-1) + 2^(k-1) = p^0 + p^1 where p = 2^k - 1 is a Mersenne prime. There is no n = p^i + p^j in this sequence with at least three sets of integer solutions (p, i, j), where i <= j. - Jinyuan Wang, Nov 30 2019

Examples

			324 = 18^2 = 3^4 + 3^5.
		

Crossrefs

Programs

  • Maple
    N:= 10^9: # to get all terms <= N
    R1:= {seq(2^i,i=2..ilog2(N))}:
    R2:= {seq(9*2^(2*r), r=0..ilog2(floor(N/9))/2)}:
    R3:= {seq(seq(2^k*(2^k-1)^(r*k),r=1..floor(log[2^k-1](N/2^k)/k)),k=select(t -> isprime(2^t-1),[$2..ilog2(N)]))}:
    sort(convert(R1 union R2 union R3, list)); # Robert Israel, Apr 25 2017
  • PARI
    upto(nn) = {my(v=List([]), k=1); for(r=2, logint(nn, 2), listput(v, 2^r)); for(r=0, logint(nn\9, 4), listput(v, 9*4^r)); while((2*2^k-2)^kJinyuan Wang, Nov 30 2019

Extensions

a(19)-a(40) from Robert Israel, Apr 25 2017

A386372 Odd numbers of the form k^m that have m binary digits 1.

Original entry on oeis.org

1, 9, 729, 4782969, 14348907, 19073486328125, 363797880709171295166015625
Offset: 1

Views

Author

David A. Corneth, Jul 19 2025

Keywords

Comments

5^89 is a term.

Examples

			9 = 3^2 = 1001_2 is in the sequence since it is a second power and it has two binary digits 1.
729 = 3^6 = 1011011001_2 is in the sequence since it is a sixth power and it has six binary digits 1.
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 2^30}, {1}~Join~Select[Union@ Flatten@ Table[a^2*b^3, {b, Surd[nn, 3]}, {a, Sqrt[nn/b^3]}], And[OddQ[#], 1 < #2 == DigitCount[#1, 2, 1]] & @@ {#, GCD @@ FactorInteger[#][[;; , -1]]} &] ] (* Michael De Vlieger, Jul 21 2025 *)
  • PARI
    \\ See Corneth link
Showing 1-6 of 6 results.