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.

A240920 Prime numbers that occur as divisors of numbers of the form m^2 + 5.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 103, 107, 109, 127, 149, 163, 167, 181, 223, 227, 229, 241, 263, 269, 281, 283, 307, 347, 349, 367, 383, 389, 401, 409, 421, 443, 449, 461, 463, 467, 487, 503, 509, 521, 523, 541, 547, 563
Offset: 1

Views

Author

J. Lowell, Aug 02 2014

Keywords

Comments

Conjecture: a prime number is in this sequence if and only if its next-to-last digit is even.
The law of quadratic reciprocity shows an odd prime is in the sequence if and only if it is 1, 3, 5, 7 or 9 (mod 20). This proves the above conjecture, so the sequence is the union of {2, 5} and A139513. - Jens Kruse Andersen, Aug 09 2014

Examples

			23 is in the sequence because it divides 8^2+5=69 with m=8.
		

Crossrefs

Cf. A002313 (k=1 or k=4), A033203 (k=2), A045331 (k=3), A139513.

Programs

  • Maple
    isA240920 := proc(p)
        local n;
        if isprime(p) then
            for n from 0 to p do
                if modp(n^2+5,p) = 0 then
                    return true;
                end if;
            end do:
            false;
        else
            false;
        end if;
    end proc:
    for i from 1 to 600 do
        p := ithprime(i) ;
        if isA240920(p) then
            printf("%d,",p);
        end if;
    end do:
  • PARI
    select(p->issquare(Mod(-5,p)), primes(100)) \\ Charles R Greathouse IV, Nov 29 2016

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 29 2016