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.

Showing 1-4 of 4 results.

A180278 Smallest nonnegative integer k such that k^2 + 1 has exactly n distinct prime factors.

Original entry on oeis.org

0, 1, 3, 13, 47, 447, 2163, 24263, 241727, 2923783, 16485763, 169053487, 4535472963, 36316463227, 879728844873, 4476534430363, 119919330795347, 1374445897718223, 106298577886531087
Offset: 0

Views

Author

Michel Lagneau, Jan 17 2011

Keywords

Examples

			a(2) = 3 because the 2 distinct prime factors of 3^2 + 1 are {2, 5};
a(10) = 16485763 because the 10 distinct prime factors of 16485763^2 + 1 are {2, 5, 13, 17, 29, 37, 41, 73, 149, 257}.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{k = 1}, If[n == 0, Return[0]]; Monitor[While[PrimeNu[k^2 + 1] != n, k++]; k, {n, k}]]; Table[a[n], {n, 0, 8}] (* Robert P. P. McKone, Sep 13 2023 *)
  • PARI
    a(n)=for(k=0, oo, if(omega(k^2+1) == n, return(k))) \\ Andrew Howroyd, Sep 12 2023
  • Python
    from itertools import count
    from sympy import factorint
    def A180278(n):
        return next(k for k in count() if len(factorint(k**2+1)) == n) # Pontus von Brömssen, Sep 12 2023
    

Formula

a(n) >= sqrt(A185952(n)-1). - Charles R Greathouse IV, Feb 17 2015
a(n) <= A164511(n). - Daniel Suteu, Feb 20 2023

Extensions

a(9), a(10) and example corrected; a(11) added by Donovan Johnson, Aug 27 2012
a(12) from Giovanni Resta, May 10 2017
a(13)-a(17) from Daniel Suteu, Feb 20 2023
Name clarified and incorrect programs removed by Pontus von Brömssen, Sep 12 2023
a(18) from Max Alekseyev, Feb 24 2024

A006278 a(n) is the product of the first n primes congruent to 1 (mod 4).

Original entry on oeis.org

5, 65, 1105, 32045, 1185665, 48612265, 2576450045, 157163452745, 11472932050385, 1021090952484265, 99045822390973705, 10003628061488344205, 1090395458702229518345, 123214686833351935572985
Offset: 1

Views

Author

Gene_Salamin(AT)cohr.com

Keywords

Comments

a(n)+2 is prime for n=1,2. No others are prime for n <= 200. Compare A002110 and A078586. - T. D. Noe, Dec 01 2002
Also, a(n) is least hypotenuse of exactly A003462(n) Pythagorean triangles of which 2^(n-1) are primitive. - Lekraj Beedassy, Dec 06 2003
Also, a(n) are the record setting values of m, for the number of solutions to "m*k-1 is a square", for some k, 1 <= k < m. There is one solution for m=2, and for a given m = a(n) there are 2^n solutions. For a given m there also 2^(n-1) solutions for primitively representing m as x^2 + y^2. See A008782. Also compare with A102476, which applies to "m*k+1 is a square". - Richard R. Forberg, Mar 18 2016
a(n) is the smallest m such that A000089(m) = 2^n. Also, numbers k for which A000089(k) sets a new record. - Jianing Song, Apr 27 2019

Crossrefs

Programs

  • Mathematica
    maxN=15; pLst={}; k=0; While[Length[pLst]Harvey P. Dale, Jun 16 2013 *)
  • PARI
    tree(v)=my(t=#v); if(t<4, factorback(v), tree(v[1..t\2])*tree(v[t\2+1..t]));
    a(n,x=9*n\4+2)=my(P=select(p->p%4==1, primes(x))); if(#PCharles R Greathouse IV, Jan 08 2018

Formula

a(n) = Product_{i=1..n} A002144(i). - Alois P. Heinz, Mar 01 2021

A257366 Smallest integer m such that m^2 + 1 has exactly n prime factors, counted with multiplicity.

Original entry on oeis.org

1, 3, 7, 43, 57, 307, 1068, 2943, 12943, 45807, 110443, 670807, 2733307, 25670807, 113561432, 123327057, 657922943, 17213170807, 7200891693, 148802454193, 1120482141693
Offset: 1

Views

Author

Zak Seidov, Apr 21 2015

Keywords

Comments

Or, first occurrences of n in A193330.
Is the sequence finite?
a(n) exists for arbitrarily large n, and in particular a(n+k) < A185952(n) by the Chinese Remainder Theorem and the fact that -1 is a square mod the primes in A002313, for some k >= 0. Probably a(n) exists for each n. - Charles R Greathouse IV, Apr 21 2015
From Jon E. Schoenfield, Jun 14-15 2015: (Start)
Numbers of the form m^2+1 cannot be divisible by 3; they may be divisible by 2 (but not 2^2), and the only other numbers they can have as prime factors are 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, ..., i.e., the terms of A002144. This explains why 5 tends to appear with such high multiplicity in the factorizations of a(n)^2+1, as numbers with a higher multiplicity of the prime factor 5 are more likely to be small enough to be the smallest integer with n prime factors than numbers whose n prime factors (counted with multiplicity) are mostly larger than 5. Having 2 as one of the n prime factors is also an advantage, which accounts for the predominance of odd terms, yielding even values of m^2+1.
For k>1, if m^2+1 is divisible by 5^k, then there are only two possible residues of m mod 5^k; e.g., if m^2+1 is divisible by 5^4, then m mod 5^4 must be either 182 or 443. Thus it is not coincidental that the last few digits of some terms also appear as the last few digits of other terms, e.g., terms ending in 443 or 443+500 = 943, or in 182+125 = 307 or 182+625 = 807. (End)

Examples

			a(1)=1 because 1^2+1=2(prime),
a(2)=3 because 3^2+1=10=2*5,
a(3)=7 because 7^2+1=50=2*2*5,
...............
a(14)=25670807 because 25670807^2+1=2*5^11*149*45289.
		

Crossrefs

Programs

Extensions

a(15)-a(17) from Jon E. Schoenfield, Jun 14 2015
a(18)-a(19) from Jon E. Schoenfield, Jun 15 2015
a(20) from Jon E. Schoenfield, Jul 10 2015
a(21) from Max Alekseyev, Jan 08 2025

A282686 Least sum of two proper prime powers (A246547) that is the product of n distinct primes.

Original entry on oeis.org

13, 33, 130, 966, 14322, 81510, 3530730, 117535110, 2211297270, 131031070170, 1295080356570, 163411918786830, 3389900689405230, 414524121952915590, 2951531806477464210, 754260388389042905370
Offset: 1

Views

Author

Altug Alkan, Feb 20 2017

Keywords

Comments

Least value of A225102 that is the product of n distinct primes.
From Jon E. Schoenfield, Mar 18 2017: (Start)
For each n, we can write a(n) = p^j + q^k where p and q are prime and 2 <= j <= k; since a(n) is squarefree, p and q are distinct.
Suppose j and k are both even. Then a(n) cannot have any prime factor f such that f == 3 (mod 4) (see A002145). Thus, a(n) is the product of n distinct terms of {2, 5, 13, 17, 29, 37, 41, ...} = A002313, so a(n) >= Product_{i=1..n} A002313(i) = A185952(n).
In fact, however, a(n) < A185952(n) for n = 4..15, and it seems nearly certain that this holds for all n > 3. In any case, if we search for a(n) by generating products of n distinct primes and, for each such product P, testing whether there exists a solution for P = p^j + q^k, then we need not consider solutions in which both j and k are even unless P >= A185952(n).
Additionally, since the sum of any two cubes that is divisible by 3 is also divisible by 9 (hence nonsquarefree), any P that is divisible by 3 cannot be the sum of two cubes, so the exponents j and k cannot both be divisible by 3. (Every P < 2*5*7*11*...*prime(n+1) = A002110(n+1)/3 is divisible by 3.) Thus, for every P that is divisible by 3 and < A185292(n), we can rule out every ordered pair (j,k) except (2,3) and (3,4) (which could be tested together by computing t = P - r^3 for each prime r < P^(1/3) and, if t is square, checking whether sqrt(t) is a prime or the square of a prime) and those with k >= 5 (which could be tested by checking whether t = P - q^k is a prime power for each prime power q^k that is less than P and has k >= 5). (End)
a(17) <= 63985284333636413237490 = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 * 29 * 37 * 41 * 43 * 59 * 61 * 103 * 409 = 10461281^3 + 250679912393^2. - Jon E. Schoenfield, Mar 31 2017

Examples

			a(1) = 13 = 2^2 + 3^2.
a(2) = 33 = 5^2 + 2^3 = 3 * 11.
a(3) = 130 = 3^2 + 11^2 = 2 * 5 * 13.
a(4) = 966 = 5^3 + 29^2 = 2 * 3 * 7 * 23.
a(5) = 14322 = 17^3 + 97^2 = 2 * 3 * 7 * 11 * 31.
a(6) = 81510 = 29^3 + 239^2 = 2 * 3 * 5 * 11 * 13 * 19.
a(7) = 3530730 = 41^4 + 89^3 = 2 * 3 * 5 * 7 * 17 * 23 * 43.
a(8) = 117535110 = 461^3 + 4423^2 = 2 * 3 * 5 * 7 * 11 * 17 * 41 * 73.
From _Jon E. Schoenfield_, Mar 14 2017: (Start)
a(9) = 2211297270 = 1301^3 + 3037^2 = 2 * 3 * 5 * 7 * 13 * 17 * 29 * 31 * 53.
a(10) = 131031070170 = 1361^3 + 358483^2 = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 43 * 47 * 127. (End)
From _Giovanni Resta_, Mar 14 2017: (Start)
a(11) = 810571^2 + 8609^3,
a(12) = 12694849^2 + 13109^3. (End)
From _Jon E. Schoenfield_, Mar 18 2017: (Start)
a(13) = 24537703^2 + 140741^3.
a(14) = 639414679^2 + 178349^3.
a(15) = 1632727069^2 + 658649^3. (End)
a(16) = 1472015189^2 + 9094049^3. - _Jon E. Schoenfield_, Mar 19 2017
		

Crossrefs

Programs

  • Maple
    N:= 1.2*10^8: # to get all terms <= N
    PP:= {seq(seq(p^k,k=2..floor(log[p](N))), p = select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]))}:
    PP:= sort(convert(PP,list)):
    A:= 'A':
    for i from 1 to nops(PP) do
      for j from 1 to i do
         Q:= PP[i]+PP[j];
         if Q > N then break fi;
         F:= ifactors(Q)[2];
         if max(seq(f[2],f=F))>1 then next fi;
         m:= nops(F);
         if not assigned(A[m]) or A[m] > Q then A[m]:= Q fi
    od od:
    seq(A[i],i=1..max(map(op,[indices(A)]))); # Robert Israel, Mar 01 2017
  • Mathematica
    (* first 8 terms *) mx = 1.2*^8; a = 0 Range[8] + mx; p = Sort@ Flatten@ Table[ p^Range[2, Log[p, mx]], {p, Prime@ Range@ PrimePi@ Sqrt@ mx}]; Do[ j=1; While[j <= i && (v = p[[i]] + p[[j]]) < mx, f = FactorInteger@v; If[Max[Last /@ f] == 1, c = Length@f; If[c < 9 && v < a[[c]], a[[c]] = v]]; j++], {i, Length@p}]; a (* Giovanni Resta, Mar 19 2017 *)
  • PARI
    do(lim)=my(v=List(),u=v,t,f); t=1; for(i=1,lim, t*=prime(i); if(t>lim,break); listput(v, oo)); v=Vec(v); for(e=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim-4,e), listput(u,p^e))); u=Set(u); for(i=1,#u, for(j=1,i, t=u[i]+u[j]; if(t>lim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tif(k==oo,"?",k), v) \\ Charles R Greathouse IV, Mar 19 2017
    
  • PARI
    do(lim)=my(v=List(),u=v,t,f,p2); t=1; for(i=1,lim, t*=prime(i); if(t>lim,break); listput(v, oo)); v=Vec(v); for(e=3,logint(lim\=1,2), forprime(p=2,sqrtnint(lim-4,e), listput(u,p^e))); u=Set(u); for(i=1,#u, for(j=1,i, t=u[i]+u[j]; if(t>lim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tlim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tlim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tif(k==oo,"?",k), v) \\ Charles R Greathouse IV, Mar 19 2017

Extensions

a(7)-a(8) from Giovanni Resta, Feb 21 2017
a(9)-a(10) from Jon E. Schoenfield, Mar 14 2017
a(11)-a(12) from Giovanni Resta, Mar 14 2017
a(13)-a(15) from Jon E. Schoenfield, Mar 18 2017
a(16) from Jon E. Schoenfield, Mar 19 2017
Showing 1-4 of 4 results.