A267858 Positions of entries of A002972 that are congruent to 1 modulo 4.
1, 3, 4, 5, 6, 8, 10, 11, 12, 18, 19, 21, 23, 25, 26, 27, 28, 29, 30, 32, 33, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 53, 55, 56, 57, 59, 60, 63, 65, 66, 68, 69, 72, 73, 74, 77, 78, 85, 87, 88, 89, 90, 91, 93, 94, 95, 96, 100, 104, 105, 106, 108, 110, 112, 115, 119, 120, 122, 127, 128, 131
Offset: 1
Keywords
Examples
n=1: A002972(1) = 1 == 1 (mod 4). But because m = 2 is not in this sequence A002972(2) = 3 == 3 (mod 4).
Programs
-
Mathematica
pmax = 2000; odd[p_] := Module[{k, m}, 2m+1 /. ToRules[Reduce[k>0 && m >= 0 && (2k)^2 + (2m+1)^2 == p, {k, m}, Integers]]]; Reap[For[n=1; p=5, p < pmax, p = NextPrime[p], If[Mod[p, 4]==1, If[Mod[odd[p], 4]==1, Sow[n]]; n++]]][[2, 1]] (* Jean-François Alcover, Feb 26 2016 *)
Formula
A002972(a(n)) == 1 (mod 4), n >= 1.
Comments