|
|
A034793
|
|
a(1)=1; thereafter a(n+1) is the least k > a(n) such that k is a square mod a(i) for all i<= n.
|
|
3
|
|
|
1, 2, 3, 4, 9, 13, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For 7 <= n < 10^12.5, a(n) = (n-3)^2. On the ERH this holds for all n >= 7; unconditionally it holds for all but finitely many n. - Charles R Greathouse IV, Mar 29 2012
a(n) is the smallest integer larger than a(n-1) such that a(n) is a quadratic residuum modulo all a(i), 1<=i<n. - R. J. Mathar, Jul 27 2015
|
|
LINKS
|
|
|
FORMULA
|
Apparently includes all positive squares along with 2, 3 and 13.
|
|
MAPLE
|
option remember;
local a, wrks ;
if n = 1 then
1;
else
for a from procname(n-1)+1 do
wrks := true;
for i from 1 to n-1 do
if numtheory[quadres](a, procname(i)) <> 1 then
wrks := false;
break;
end if;
end do;
if wrks then
return a;
end if;
end do:
|
|
MATHEMATICA
|
a[n_ ] := If[n<7, {1, 2, 3, 4, 9, 13}[[n]], (n-3)^2]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jul 22 2015, after Charles R Greathouse IV *)
|
|
PROG
|
(Haskell)
a034793 n = a034793_list !! (n-1)
a034793_list = 1 : f [2..] [1] where
f (x:xs) ys | and $ map (isSquMod x) ys = x : f xs (x:ys)
| otherwise = f xs ys
isSquMod u v = u `mod` v `elem` (map ((`mod` v) . (^ 2)) [0..v-1])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|