login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
A034793 := proc(n)
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:
end i # R. J. Mathar, Jul 27 2015
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])
-- Reinhard Zumkeller, Mar 27 2012
(PARI) a(n)=if(n<7, [1, 2, 3, 4, 9, 13][n], (n-3)^2) \\ Charles R Greathouse IV, Mar 29 2012
CROSSREFS
Sequence in context: A281992 A100902 A283447 * A134313 A307403 A220952
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More precise definition from Giovanni Resta, Jul 22 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)