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.
%I A061345 #68 Feb 27 2025 12:45:04 %S A061345 1,3,5,7,9,11,13,17,19,23,25,27,29,31,37,41,43,47,49,53,59,61,67,71, %T A061345 73,79,81,83,89,97,101,103,107,109,113,121,125,127,131,137,139,149, %U A061345 151,157,163,167,169,173,179,181,191,193,197,199,211,223,227,229,233,239 %N A061345 Powers of odd primes. Alternatively, 1 and the odd prime powers (p^k, p an odd prime, k >= 1). %C A061345 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 %C A061345 For n > 0, also the allowed indices of a Cossidente-Penttila graph. - _Eric W. Weisstein_, Feb 24 2025 %H A061345 Robert Israel, <a href="/A061345/b061345.txt">Table of n, a(n) for n = 0..10000</a> %H A061345 L. J. Corwin, <a href="/A033948/a033948.pdf">Irreducible polynomials over the integers which factor mod p for every p</a>, Unpublished Bell Labs Memo, Sep 07 1967 [Annotated scanned copy] %H A061345 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OddPrimePower.html">Odd Prime Power</a>. %F A061345 a(n) = A061344(n)-1. %F A061345 Intersection of A000961 (prime powers) and A005408 (odd numbers). - _Robert Israel_, Jun 11 2014 %p A061345 select(t -> nops(ifactors(t)[2])<=1, [seq(2*i+1,i=0..1000)]); # _Robert Israel_, Jun 11 2014 %p A061345 # alternative: %p A061345 A061345 := proc(n) %p A061345 option remember; %p A061345 local k ; %p A061345 if n = 0 then %p A061345 1; %p A061345 else %p A061345 for k from procname(n-1)+2 by 2 do %p A061345 if nops(numtheory[factorset](k)) = 1 then %p A061345 return k ; %p A061345 end if; %p A061345 end do: %p A061345 end if; %p A061345 end proc: # _R. J. Mathar_, Jun 25 2016 %p A061345 isOddPrimepower := n -> type(n, 'primepower') and not type(n, 'even'): %p A061345 A061345List := up_to -> select(isOddPrimepower, [`$`(1..up_to)]): %p A061345 A061345List(240); # _Peter Luschny_, Feb 02 2023 %t A061345 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 *) %t A061345 Select[2 Range@ 130 - 1, PrimeNu@# < 2 &] (* _Robert G. Wilson v_, Jun 12 2014 *) %t A061345 Join[{1}, Select[Range[1, 200, 2], PrimePowerQ]] (* _Eric W. Weisstein_, Feb 23 2025 *) %o A061345 (Magma) [1] cat [n: n in [3..300 by 2] | IsPrimePower(n)]; // _Bruno Berselli_, Feb 25 2016 %o A061345 (PARI) is(n)=my(p); if(isprimepower(n,&p), p>2, n==1) \\ _Charles R Greathouse IV_, Jun 08 2016 %o A061345 (Python) %o A061345 from sympy import primepi, integer_nthroot %o A061345 def A061345(n): %o A061345 def bisection(f,kmin=0,kmax=1): %o A061345 while f(kmax) > kmax: kmax <<= 1 %o A061345 kmin = kmax >> 1 %o A061345 while kmax-kmin > 1: %o A061345 kmid = kmax+kmin>>1 %o A061345 if f(kmid) <= kmid: %o A061345 kmax = kmid %o A061345 else: %o A061345 kmin = kmid %o A061345 return kmax %o A061345 def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length()))) %o A061345 return bisection(f,n+1,n+1) # _Chai Wah Wu_, Feb 03 2025 %Y A061345 Cf. A061346, A000961, A005408, A061344, A075109, A075110. %K A061345 nonn,easy %O A061345 0,2 %A A061345 _N. J. A. Sloane_, Jun 08 2001 %E A061345 More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001