OFFSET
1,2
COMMENTS
The lines with negative slope appearing to rise out of plots is caused by pq = 15 and large r. - T. D. Noe, Jul 28 2011
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
a(1) = 2^(3*5) mod 7 = 32768 mod 7 = 1 because A046389(1) = 105 = 3*5*7.
MAPLE
b:= proc(n) option remember; local i, k, l;
if n=1 then 3, 5, 7
else for k from mul(i, i=b(n-1)) +2 by 2
do l:= ifactors(k)[2];
if nops(l) = 3 and add(i[2], i=l) = 3
then break fi
od; sort(map(i-> i[1], l))[]
fi
end:
a:= proc(n) option remember; local p, q, r;
p, q, r:= b(n);
2 &^ (p*q) mod r
end:
seq(a(n), n=1..70); # Alois P. Heinz, Jan 17 2011
MATHEMATICA
Reap[For[n = 105, n < 2000, n += 2, f = FactorInteger[n] // Transpose; If[f[[2]] == {1, 1, 1}, {p, q, r} = f[[1]]; Sow[Mod[2^(p*q), r]]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2016 *)
PROG
(Haskell)
import Data.List (nub)
a180197 n = a180197_list !! (n-1)
a180197_list = f 1 where
f x = if length ps == 3 && nub ps == ps
then (2 ^ (ps!!0 * ps!!1) `mod` ps!!2) : f (x+2) else f (x+2)
where ps = a027746_row x
-- Reinhard Zumkeller, Jan 29 2014
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Juri-Stepan Gerasimov, Jan 16 2011
EXTENSIONS
More terms from Alois P. Heinz, Jan 17 2011
STATUS
approved