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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A034791 a(n) is square mod a(i), i < n. 3
 1, 2, 7, 14, 31, 62, 113, 226, 233, 466, 647, 1294, 1487, 2974, 4919, 6329, 7951, 12658, 15902, 26329, 26833, 47737, 52658, 53623, 53666, 95474, 107246, 128959, 135697, 142327, 271394, 284654, 715177, 1312777, 1430354, 1474657, 2625554 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Apparently A034698 is a subsequence and all elements are products of elements of A034698. a(n) is the smallest integer larger than a(n-1) such that all a(i), 1<=i 1 then wrks := false; end if; end do; if wrks then return a; end if; end do: end if; end proc: # R. J. Mathar, Jul 27 2015 MATHEMATICA residueQ[n_, k_] := Length[Select[Range[Floor[k/2]], PowerMod[#, 2, k] == n &, 1]] == 1; a[1] = 1; a[n_] := a[n] = For[r = Range[n - 1]; an = a[n - 1] + 1, True, an++, If[AllTrue[r, residueQ[a[#], an] &], Return[an]]]; Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 37}] (* Jean-François Alcover, Feb 16 2018 *) PROG (Haskell) a034791 n = a034791_list !! (n-1) a034791_list = 1 : f [2..] [1] where f (x:xs) ys | and \$ map (flip 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, fixed Jul 29 2015, Mar 28 2012 CROSSREFS Cf. A034698. Cf. A034793, A034903. Sequence in context: A221235 A224916 A258321 * A140253 A018453 A286829 Adjacent sequences: A034788 A034789 A034790 * A034792 A034793 A034794 KEYWORD nonn AUTHOR David W. Wilson 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.

Last modified November 29 03:03 EST 2023. Contains 367422 sequences. (Running on oeis4.)