OFFSET
0,2
COMMENTS
Let a(n)=p^e, then tau(a(n)^2) = tau(p^(2*e)) = 2*e+1 = 2*(e+1)-1 = tau(2*a(n))-1 where tau=A000005. - Juri-Stepan Gerasimov, Jul 14 2011
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
L. J. Corwin, Irreducible polynomials over the integers which factor mod p for every p, Unpublished Bell Labs Memo, Sep 07 1967 [Annotated scanned copy]
FORMULA
a(n) = A061344(n)-1.
MAPLE
select(t -> nops(ifactors(t)[2])<=1, [seq(2*i+1, i=0..1000)]); # Robert Israel, Jun 11 2014
# alternative:
A061345 := proc(n)
option remember;
local k ;
if n = 0 then
1;
else
for k from procname(n-1)+2 by 2 do
if nops(numtheory[factorset](k)) = 1 then
return k ;
end if;
end do:
end if;
end proc: # R. J. Mathar, Jun 25 2016
isOddPrimepower := n -> type(n, 'primepower') and not type(n, 'even'):
A061345List := up_to -> select(isOddPrimepower, [`$`(1..up_to)]):
A061345List(240); # Peter Luschny, Feb 02 2023
MATHEMATICA
t={1}; k=0; Do[If[k==1, AppendTo[t, a1]]; k=0; Do[c=Sqrt[a^2+b^2]; If[IntegerQ[c]&&GCD[a, b, c]==1, k++; a1=a; b1=b; c1=c; ], {b, 4, a^2/2, 2}], {a, 3, 260, 2}]; t (* Vladimir Joseph Stephan Orlovsky, Jan 29 2012 *)
Select[2 Range@ 130 - 1, PrimeNu@# < 2 &] (* Robert G. Wilson v, Jun 12 2014 *)
PROG
(Magma) [1] cat [n: n in [3..300 by 2] | IsPrimePower(n)]; // Bruno Berselli, Feb 25 2016
(PARI) is(n)=my(p); if(isprimepower(n, &p), p>2, n==1) \\ Charles R Greathouse IV, Jun 08 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 08 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001
STATUS
approved