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.

A361904 Odd numbers k such that for all even divisors d of k^2+1, d^2+1 is a prime number.

Original entry on oeis.org

1, 3, 5, 45, 65, 175, 277, 345, 435, 573, 673, 695, 715, 875, 955, 985, 1095, 1255, 1405, 1495, 1515, 1845, 1915, 2035, 2135, 2315, 2375, 2525, 2687, 2805, 2837, 2965, 3035, 3665, 3715, 3725, 4185, 4225, 4265, 4345, 4495, 4635, 4865, 5987, 6195, 6205, 6315
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2023

Keywords

Comments

Conjecture: the sequence is infinite.
We observe two subsequences each having specific properties:
(i) a subsequence of numbers divisible by 5 such that a(n)^2+1 contains 4 divisors {1, 2, p, 2*p} including two even divisors 2 and 2*p = a(n)^2+1 where p is prime.
(ii) a subsequence of numbers > 3 not divisible by 5 such that a(n)^2+1 contains eight divisors {1, 2, 5, 10, q, 2*q, 5*q, 10*q} including four even divisors 2, 10, 2*q = (a(n)^2+1)/5 and 10*q = a(n)^2+1, where q is prime.

Examples

			5 is in the sequence because the divisors of 5^2+1 are {1, 2, 13, 26} and 2^2+1 = 5 is prime, 26^2+1 = 677 is prime.
277 is in the sequence because the divisors of 277^2+1 are {1, 2, 5, 10, 7673, 15346, 38365, 76730} and 2^2+1 = 5 is prime, 10^2+1 = 101 is prime, 15346^2+1 = 235499717 is prime, 76730^2+1 = 5887492901 is prime.
		

Crossrefs

Programs

  • Maple
    q:= k-> andmap(d-> d::odd or isprime(d^2+1), numtheory[divisors](k^2+1)):
    select(q, [2*i-1$i=1..4000])[];  # Alois P. Heinz, Mar 30 2023
  • Mathematica
    Lst={};A=Table[Length[Select[Divisors[n^2+1],EvenQ]],{n,1,10000}];B=Array[DivisorSum[#^2+1,1&,And[EvenQ@#,PrimeQ[#^2+1]]&]&,10000];Do[If[A[[m]]==B[[m]]||B[m]!=0||B[m]!=0,AppendTo[Lst,m]],{m,1,10000,2}];Lst
  • PARI
    isok(k) = if (k%2, my(d=select(x->!(x%2), divisors(k^2+1))); for (i=1, #d, if (!isprime(d[i]^2+1), return(0))); return(1)); \\ Michel Marcus, Mar 28 2023
    
  • Python
    from sympy import divisors, isprime
    def ok(n): return n&1 and all(d&1 or isprime(d**2+1) for d in divisors(n**2+1))
    print([k for k in range(7000) if ok(k)]) # Michael S. Branicky, Apr 17 2023