OFFSET
1,2
COMMENTS
(Number of primes of the form n-2^k) = (number of primes of the form n-2^k+1).
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..332
MAPLE
A109925 := proc(n) a := 0 ; for k from 0 do p := n-2^k ; if p < 2 then return a; elif isprime(p) then a := a+1 ; end if; end do: end proc:
for n from 1 to 1500 do if isA175956(n) then printf("%d, ", n); end if; end do:
# R. J. Mathar, Oct 30 2010
MATHEMATICA
SequencePosition[Table[Count[n-2^Range[0, Floor[Log2[n]]], _?PrimeQ], {n, 800}], {x_, x_}][[;; , 1]] (* Harvey P. Dale, Oct 21 2024 *)
PROG
(Magma) a109925:=function(n); count:=0; e:=1; while e le n do if IsPrime(n-e) then count+:=1; end if; e*:=2; end while; return count; end function; S:=[]; a:=a109925(1); for n in [1..750] do b:=a109925(n+1); if a eq b then Append(~S, n); end if; a:=b; end for; S; // Klaus Brockhaus, Oct 30 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Oct 29 2010, Oct 31 2010
EXTENSIONS
More terms from Klaus Brockhaus and R. J. Mathar, Oct 30 2010
STATUS
approved