cp's OEIS Frontend

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.

A248527 Numbers n such that the smallest prime divisor of n^2+1 is 13.

This page as a plain text file.
%I A248527 #17 Sep 08 2022 08:46:10
%S A248527 34,44,60,70,86,96,164,174,190,200,216,226,294,304,320,330,346,356,
%T A248527 424,434,450,460,476,486,554,564,580,590,606,616,684,694,710,720,736,
%U A248527 746,814,824,840,850,866,876,944,954,970,980,996,1006,1074,1084,1100,1110
%N A248527 Numbers n such that the smallest prime divisor of n^2+1 is 13.
%C A248527 Or numbers n such that the smallest prime divisor of A002522(n) is A002313(3).
%C A248527 a(n) == 8 (mod 26) if n is odd and a(n) == 18 (mod 26) if n is even.
%C A248527 It is interesting to observe that a(n) is given by a linear formula (see the formula below).
%H A248527 Amiram Eldar, <a href="/A248527/b248527.txt">Table of n, a(n) for n = 1..10000</a>
%F A248527 {a(n)} = {8+(k + m)*26} union {18+(k + m)*26} for m = 0, 5, 10,...,5p,... and k = 1, 2, 3 (values in increasing order).
%e A248527 34 is in the sequence because 34^2+1= 13*89.
%p A248527 * first program *
%p A248527 with(numtheory):p:=13:
%p A248527    for n from 1 to 1000 do:
%p A248527     if factorset(n^2+1)[1] = p then printf(`%d, `, n):
%p A248527     else
%p A248527     fi:
%p A248527    od:
%p A248527 * second program using the formula*
%p A248527 for n from 0 to 100 by 5 do:
%p A248527    for k from 1 to 3 do:
%p A248527      x:=8+(k+n)*26:y:=18+(k+n)*26:
%p A248527      printf(`%d, `,x):printf(`%d, `,y):
%p A248527    od:
%p A248527   od:
%t A248527 lst={};Do[If[FactorInteger[n^2+1][[1,1]]==13,AppendTo[lst,n]],{n,2,2000}];lst
%t A248527 p = 13; ps = Select[Range[p - 1], Mod[#, 4] != 3 && PrimeQ[#] &]; Select[Range[1200], Divisible[(nn = #^2 + 1), p] && ! Or @@ Divisible[nn, ps] &] (* _Amiram Eldar_, Aug 16 2019 *)
%o A248527 (PARI) isok(n) = factor(n^2+1)[1,1] == 13; \\ _Michel Marcus_, Oct 08 2014
%o A248527 (Magma) [n: n in [2..3000] | PrimeDivisors(n^2+1)[1] eq 13]; // _Bruno Berselli_, Oct 08 2014
%Y A248527 Cf. A002522, A089120, A002313.
%K A248527 nonn
%O A248527 1,1
%A A248527 _Michel Lagneau_, Oct 08 2014