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.

A342475 Prime numbers whose binary expansion contains only prime powers of 2 and the zeroth power.

This page as a plain text file.
%I A342475 #30 May 09 2021 10:21:40
%S A342475 5,13,37,41,137,173,2053,2081,2089,2213,2221,8233,8237,8329,8353,
%T A342475 10253,10273,10369,131113,131213,133121,133153,133157,133253,133261,
%U A342475 139273,139297,139301,139309,139393,139397,139429,141353,141481,524429,524453,526373,526381,526501
%N A342475 Prime numbers whose binary expansion contains only prime powers of 2 and the zeroth power.
%C A342475 The numbers m = 2^e(0) + 2^e(1) + 2^e(2) + ... where all e(i) are either 0 or prime are 1, 4, 5, 8, 9, 12, 13, 32, 33, 36, 37, 40, 41, 44, 45, 128, 129, 132, 133, 136, 137, 140, 141, 160, 161, 164, ... The sequence contains the m which are primes. - _R. J. Mathar_, Apr 21 2021
%e A342475 5 = 2^2 + 2^0 is a term.
%e A342475 7 = 2^2 + 2^1 + 2^0 is not a term, because the exponent 1 is not a prime.
%e A342475 11 = 2^3 + 2^1 + 2^0 is not a term, because the exponent 1 is not a prime.
%e A342475 13 = 2^3 + 2^2 + 2^0 is a term.
%t A342475 Select[Array[1 + Total@ MapIndexed[#1*2^Prime[#2] & @@ {#1, First[#2]} &, Reverse@ IntegerDigits[#, 2]] &, 140], PrimeQ] (* _Michael De Vlieger_, Mar 13 2021 *)
%o A342475 (PARI) isok(p) = if (isprime(p), my(b=Vecrev(binary(p))); sum(i=1, #b, b[i]*((i!=1) && !isprime(i-1))) == 0); \\ _Michel Marcus_, Apr 22 2021
%Y A342475 Cf. A004676, A326782, A342481.
%K A342475 nonn,base
%O A342475 1,1
%A A342475 _Vassilis Papadimitriou_, Mar 13 2021