This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A247592 #14 May 22 2025 10:21:40 %S A247592 2,8,10,25,42,147,160,169,238,260,491,544,869,890,923,1140,1337,1386, %T A247592 1465,1643,1927,3371,4614,5038,5086,5225,5832,5909,5995,7118,7157, %U A247592 8540,9859,12543,13505,13795,13841,14211,15347,17079,17263,18643,20211,21184,21245 %N A247592 Numbers n such that A002496(n) mod A002496(n-1) is a perfect square. %C A247592 A002496 : primes of form n^2+1. %C A247592 The prime numbers of the sequence are 2, 491, 3371, 9859, 13841,... %C A247592 The corresponding squares A002496(n) mod A002496 (n-1) are : {1, 144, 100, 1024, 4900, 10816, 11664, 12544,...} = {1} union {A216330} minus {64}. %H A247592 Chai Wah Wu, <a href="/A247592/b247592.txt">Table of n, a(n) for n = 1..200</a> %e A247592 a(3)=10 because A002496(10) mod A002496(9)= 677 mod 577 = 10^2. %p A247592 with(numtheory):nn:=360000:T:=array(1..nn):kk:=0: %p A247592 for n from 1 to nn do: %p A247592 if type(n^2+1,prime)=true then %p A247592 kk:=kk+1:T[kk]:=n^2+1: %p A247592 else %p A247592 fi: %p A247592 od: %p A247592 for m from 1 to kk-1 do: %p A247592 r:=irem(T[m+1],T[m]):z:=sqrt(r): %p A247592 if z=floor(z) %p A247592 then printf(`%d, `, m+1): %p A247592 else %p A247592 fi: %p A247592 od: %t A247592 lst={};lst1={};nn=400000;Do[If[PrimeQ[n^2+1],AppendTo[lst,n^2+1]],{n,1,nn}];nn1:=Length[lst]; %t A247592 Do[If[IntegerQ[Sqrt[Mod[lst[[m]],lst[[m-1]]]]],AppendTo[lst1,m]],{m,2,nn1}];lst1 %o A247592 (Python) %o A247592 from gmpy2 import t_mod, is_square, is_prime %o A247592 A247592_list, A002496_list, m, c = [], [2], 2, 2 %o A247592 for n in range(1, 10**7): %o A247592 m += 2*n+1 %o A247592 if is_prime(m): %o A247592 if is_square(t_mod(m, A002496_list[-1])): %o A247592 A247592_list.append(c) %o A247592 A002496_list.append(m) %o A247592 c += 1 # _Chai Wah Wu_, Sep 20 2014 %Y A247592 Cf. A002496, A193558, A216330. %K A247592 nonn %O A247592 1,1 %A A247592 _Michel Lagneau_, Sep 20 2014