OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
. n | a(n) n | a(n)
. ----+------------------ ----+------------------
. 1 | 6 = 2 * 3 13 | 77 = 7 * 11
. 2 | 12 = 2^2 * 3 14 | 96 = 2^5 * 3
. 3 | 15 = 3 * 5 15 | 108 = 2^2 * 3^3
. 4 | 18 = 2 * 3^2 16 | 135 = 3^3 * 5
. 5 | 24 = 2^3 * 3 17 | 143 = 11 * 13
. 6 | 35 = 5 * 7 18 | 144 = 2^4 * 3^2
. 7 | 36 = 2^2 * 3^2 19 | 162 = 2 * 3^4
. 8 | 45 = 3^2 * 5 20 | 175 = 5^2 * 7
. 9 | 48 = 2^4 * 3 21 | 192 = 2^6 * 3
. 10 | 54 = 2 * 3^3 22 | 216 = 2^3 * 3^3
. 11 | 72 = 2^3 * 3^2 23 | 221 = 13 * 17
. 12 | 75 = 3 * 5^2 24 | 225 = 3^2 * 5^2 .
MATHEMATICA
Select[Range[2000], MatchQ[FactorInteger[#], {{p_, _}, {q_, _}} /; q == NextPrime[p]]&] (* Jean-François Alcover, Dec 31 2017 *)
PROG
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a256617 n = a256617_list !! (n-1)
a256617_list = f (singleton (6, 2, 3)) $ tail a000040_list where
f s ps@(p : ps'@(p':_))
| m < p * p' = m : f (insert (m * q, q, q')
(insert (m * q', q, q') s')) ps
| otherwise = f (insert (p * p', p, p') s) ps'
where ((m, q, q'), s') = deleteFindMin s
(PARI) is(n) = if(omega(n)!=2, return(0), my(f=factor(n)[, 1]~); if(f[2]==nextprime(f[1]+1), return(1))); 0 \\ Felix Fröhlich, Dec 31 2017
(PARI) list(lim)=my(v=List(), c=sqrtnint(lim\=1, 3), d=nextprime(c+1), p=2); forprime(q=3, d, for(i=1, logint(lim\q, p), my(t=p^i); while((t*=q)<=lim, listput(v, t))); p=q); forprime(q=d+1, lim\precprime(sqrtint(lim)), listput(v, p*q); p=q); Set(v) \\ Charles R Greathouse IV, Apr 12 2020
(Python)
from sympy import primefactors, nextprime
A256617_list = []
for n in range(1, 10**5):
plist = primefactors(n)
if len(plist) == 2 and plist[1] == nextprime(plist[0]):
A256617_list.append(n) # Chai Wah Wu, Aug 23 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 05 2015
STATUS
approved