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.

Previous Showing 11-18 of 18 results.

A245463 Smallest k such that A002522(k) and A002522(k+2n) are successive primes of the form m^2+1.

Original entry on oeis.org

2, 6, 84, 66, 26, 134, 40, 94, 986, 184, 1524, 716, 864, 1246, 2986, 784, 350, 2174, 4796, 496, 7674, 13136, 3390, 12636, 5880, 9904, 16446, 37410, 6646, 10430, 56774, 31870, 9054, 24606, 12986, 54284, 35000, 124320, 114216, 58576, 88854, 85416, 18854, 3536
Offset: 1

Views

Author

Michel Lagneau, Jul 22 2014

Keywords

Comments

A002522(n) = n^2+1.
Subsequence of A005574.

Examples

			a(3) = 84 because A002522(84)=7057 and A002522(84+2*3)= 8101 are two consecutive primes of the form m^2+1.
		

Crossrefs

Programs

  • Maple
    T:=array(1..44):
    for n from 1 by 2 to 88 do:
       z:=0:ii:=0:
        for k from 2 to 10^7 while(z=0) do:
        p:=k^2+1:
        if type(p,prime)=false
         then
         ii:=ii+1:
         else
          if ii=n
          then
          printf ( "%d %d \n",(n+1)/2,k-n-1):T[(n+1)/2]:=k-n-1:z:=1:
          else
         fi:
         ii:=0:
        fi:
       od:
    od:
    print(T):
  • PARI
    for(n=1, 44, m=2; until(m==k+2*n, k=m; until(isprime(m^2+1), m++)); print1(k", ")) \\ Jens Kruse Andersen, Jul 22 2014

A248511 Difference between k and the least prime factor of k^2+1 where k is the n-th number with k^2+1 composite.

Original entry on oeis.org

1, 3, 5, 3, 7, 9, 7, 11, 13, 15, 13, 17, 19, 17, 21, 23, 25, 23, 27, 13, 29, 27, 31, 21, 33, 35, 33, 37, 39, 37, 41, 31, 43, 17, 45, 43, 47, 9, 49, 47, 51, 53, 55, 53, 57, 47, 59, 57, 61, 47, 63, 65, 63, 67, 57, 69, 67, 71, 73, 23, 75, 73, 77, 43, 79, 77, 81
Offset: 1

Views

Author

Michel Lagneau, Oct 07 2014

Keywords

Comments

a(n) = A134407(n) - least prime divisor of A134406(n).

Examples

			a(1) = 1 because the first composite is 3^2+1 = 2*5 and 3-2 = 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
       for n from 1 to 200 do:
        p:=n^2+1:x:=factorset(p):d:=n-x[1]:
        if type(p,prime)=false
        then
        printf(`%d, `,d):
        else
        fi:
       od:

A249122 a(n) = floor(n / lpf(n^2 + 1)) where lpf(n^2 + 1) is the smallest prime divisor of n^2 + 1.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 1, 4, 0, 5, 2, 6, 0, 7, 0, 8, 3, 9, 0, 10, 4, 11, 0, 12, 0, 13, 5, 14, 1, 15, 6, 16, 2, 17, 0, 18, 7, 19, 0, 20, 8, 21, 3, 22, 1, 23, 9, 24, 1, 25, 10, 26, 0, 27, 0, 28, 11, 29, 4, 30, 12, 31, 3, 32, 0, 33, 13, 34, 5, 35, 14, 36, 0, 37, 1
Offset: 1

Views

Author

Michel Lagneau, Oct 21 2014

Keywords

Comments

a(n) = floor(n / A089120(n)).
a(A002496(n)) = 0 and a(A247340(n)) = 1 where A002496 are the primes of form m^2 + 1 and A247340(n) = {3, 8, 30, 46, 50, 76, ...} are the numbers m such that m^2 + 1 = p*q, p and q primes => p | a^2+1 and q | b^2+1 for some a,b < m.

Examples

			a(8) = 1 because 30^2 + 1 = 17*53 and floor(30/17) = 1.
Or a(8) = a(A247340(2)) = 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
       for n from 1 to 200 do:
        p:=n^2+1:x:=factorset(p):d:=floor(n/x[1]):
        printf(`%d, `, d):
       od:
  • Mathematica
    Table[Floor[n/ FactorInteger[n^2+1][[ 1, 1]]], {n, 100}]
  • PARI
    a(n) = n\factor(n^2+1)[1, 1]; \\ Michel Marcus, Oct 25 2014

A276460 Numbers k such that for any positive integers a < b, if a * b = k then b - a is a square.

Original entry on oeis.org

0, 1, 2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 901, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101, 8837, 10001, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 20737, 21317, 22501, 24337, 25601, 28901, 30977, 32401, 33857, 41617, 42437, 44101, 50177, 52901
Offset: 1

Views

Author

Michel Lagneau, Sep 03 2016

Keywords

Comments

A majority of numbers are primes of form m^2+1 (A002496), and it appears that the composite numbers of the form m^2+1: 901, 10001, 20737, 75077, 234257, 266257, 276677, 571537,... are semiprimes.
For n >1, a(n)==1,5 mod 12 and a(n)==1,5 mod 16.

Examples

			901 is in the sequence because 901 = 1*901 = 17*53 => 901-1 = 30^2 and 53-17 = 6^2.
		

Crossrefs

Programs

  • Mathematica
    t={};Do[ds=Divisors[n];If[EvenQ[Length[ds]],ok=True;k=1;While[k<=Length[ds]/2&&(ok=IntegerQ[Sqrt[Abs[ds[[k]]-ds[[-k]]]]]),k++];If[ok,AppendTo[t,n]]],{n,2,10^5}];t
  • Python
    from _future_ import division
    from sympy import divisors
    from gmpy2 import is_square
    A276460_list = [0]
    for m in range(10**3):
        k = m**2+1
        for d in divisors(k):
            if d > m:
                A276460_list.append(k)
                break
            if not is_square(k//d - d):
                break # Chai Wah Wu, Sep 04 2016

Extensions

Terms 0, 1 added by Chai Wah Wu, Sep 04 2016

A359185 Numbers k such that for any positive integers x,y, if x*y=k then (x+y)^2+1 is a prime number.

Original entry on oeis.org

1, 3, 5, 9, 13, 19, 23, 25, 39, 53, 55, 73, 83, 89, 109, 119, 133, 149, 155, 159, 169, 179, 203, 223, 229, 239, 263, 269, 283, 299, 305, 313, 339, 349, 383, 395, 419, 439, 443, 463, 469, 473, 543, 569, 593, 643, 653, 673, 689, 699, 703, 713, 739, 763, 859, 863, 889, 909
Offset: 1

Views

Author

Michel Lagneau, Dec 19 2022

Keywords

Comments

Conjecture: if a term k is a perfect square > 1, then sqrt(k) is in the sequence A236068 (Primes p such that f(f(p)) is prime, where f(z) = z^2 + 1).
The conjecture is false. A counterexample is 296147^2 = 87703045609 where 296147 = 47 * 6301. - Robert Israel, Mar 05 2024
The primes of the sequence are in A157468.
All terms except 1 are congruent to 3, 5 or 9 (mod 10). - Robert Israel, Mar 05 2024

Examples

			909 is in the sequence because 909 = 3^2*101 with 3 decompositions:
909 = 1*909 and (1+909)^2+1 = 910^2+1 = 828101 is prime;
909 = 3*303 and (3+303)^2+1 = 306^2+1 = 93637 is prime;
909 = 9*101 and (9+101)^2+1 = 110^2+1 = 12101 is prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F;
      F:= select(t -> t^2 <= n, numtheory:-divisors(n));
      andmap(t -> isprime((t + n/t)^2+1), F)
    end proc:
    select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Mar 05 2024
  • Mathematica
    t={};Do[ds=Divisors[n];k=1;While[k<=(Length[ds]+1)/2&&(ok=PrimeQ[(ds[[k]]+ds[[-k]])^2+1]),k++];If[ok,AppendTo[t,n]],{n,1,2000}];t
  • PARI
    isok(k) = fordiv(k, d, if ((d<=k/d) && !isprime((d+k/d)^2+1), return(0));); return(1); \\ Michel Marcus, Dec 19 2022

A180508 Numbers k such that k^2 + 1 = p*q, p and q primes and | p-q | <= k.

Original entry on oeis.org

3, 8, 46, 50, 76, 100, 144, 266, 274, 334, 504, 516, 526, 566, 670, 726, 756, 810, 836, 844, 1064, 1086, 1164, 1250, 1300, 1714, 1740, 1800, 1826, 1834, 1946, 1950, 2014, 2194, 2220, 2440, 2450, 2466, 2494, 2560, 2610
Offset: 1

Views

Author

Michel Lagneau, Jan 20 2011

Keywords

Comments

|p - q| = k for k = 3, 8, 144.

Examples

			46 is in the sequence because 46^2 + 1 = 29*73, and 73-29 = 44 < 46.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 4000 do: x:=n^2+1:y:=factorset(x):yy:=bigomega(x):if
      yy=2 and (y[2]-y[1] < n or y[2]-y[1] = n) then printf(`%d, `,n):else fi:od:

A206246 Numbers n such that the greatest prime divisor p of n^2+1 has the property that (p - n)^2 + 1 = p.

Original entry on oeis.org

1, 3, 7, 13, 21, 31, 43, 91, 111, 183, 211, 241, 273, 381, 421, 553, 601, 651, 703, 1261, 1333, 1561, 1641, 2863, 2971, 3081, 3193, 4291, 4423, 5403, 5551, 6973, 7141, 8011, 8191, 8743, 8931, 11991, 12211, 13341, 13573, 14281, 14521, 15253, 15501, 15751, 16003
Offset: 1

Views

Author

Michel Lagneau, Feb 05 2012

Keywords

Comments

For the n > 1 in this sequence, n^2+1 is composite. The corresponding primes p are A002496(n) repeated two times for n > 1 : {2, 5, 5, 17, 17, 37, 37, 101, 101, 197,...}.
Because this sequence is connected with A002496, it is conjectured that the set of this numbers is infinite.

Examples

			31 is in the sequence because 31^2 + 1 = 2*13*37 and (37 - 31)^2 + 1 = 37.
43 is in the sequence because 43^2 + 1 = 2*5*5*37 and (37 - 43)^2 + 1 = 37.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 20000 do:x:=n^2+1:y:=factorset(x):n1:=nops(y):p:=y[n1]:q:=(p-n)^2+1:if q=p then printf(`%d, `,n): else fi:od:
  • Mathematica
    pn2pQ[n_]:=Module[{p=FactorInteger[n^2+1][[-1,1]]},(p-n)^2+1==p]; Select[ Range[20000],pn2pQ] (* Harvey P. Dale, Nov 20 2019 *)

A351177 Number of distinct residues of k^(n^2) (mod n^2+1), k=0..n^2.

Original entry on oeis.org

2, 2, 10, 2, 26, 2, 42, 8, 82, 2, 122, 16, 170, 2, 226, 2, 290, 12, 362, 2, 170, 50, 530, 2, 626, 2, 90, 80, 842, 70, 962, 36, 130, 92, 1226, 2, 1370, 138, 1522, 2, 1626, 178, 1554, 152, 2026, 152, 2210, 232, 2402, 12, 2602, 272, 2810, 2, 306, 2, 1010, 338, 3482
Offset: 1

Views

Author

Michel Lagneau, Mar 18 2022

Keywords

Comments

a(A005574(n)) = 2.
a(n) = n for n = 2, 8, 128, ...
a(n) = n^2+1 (subsequence of A134406) for n = 1, 3, 5, 9, 11, 13, 15, 17, 19, 23, 25, 29, 31, ...
a(n) > 2 and a(n) <= n for n = 8, 18, 50, 60, 64, 72, 98, 112, 128, 132, 162, ... .
For n odd, gcd(a(n),n) = 1 except for n = 7, 27, 63, 75, 93, 105, 111, 125, 135, 153, 177, 207, 213, ...
For n even, gcd(a(n),n) = 2 for n in {A005574} union {22, 34, 38, 42, 46, 50, 58, 62, 78, 82, 86, 98, 102, 106, 114, 118, 122, 138, ...}
gcd(a(n),n) > 2 for n = 7, 8, 12, 18, 27, 28, 30, 32, 44, 48, 52, 60, 63, 64, 68, ...

Examples

			a(2) = 2 because k^(2^2) == 0, 1 (mod 5) implies 2 distinct residues.
The table of k^(n^2) (mod n^2+1) of residues starts in row n=1 with columns k>=2 as:
0,1;
0,1,1,1,1;
0,1,2,3,4,5,6,7,8,9;
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25;
Its row sums are 1, 4, 45, 16, 325, ...
		

Crossrefs

Programs

  • Maple
    a:= n-> nops ({seq (k&^(n^2) mod (n^2+1), k=0..n^2)}):
    seq (a(n), n=1..100);
  • Mathematica
    Table[Length[Union[PowerMod[Range[0,n^2],n^2,n^2+1]]],{n,100}]
  • PARI
    a(n) = #Set(vector(n^2+1, k, k--; Mod(k, n^2+1)^n^2)); \\ Michel Marcus, Mar 18 2022
Previous Showing 11-18 of 18 results.