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.

A337427 a(n) is the least prime of the form (3^r*5^s*7^t - 1)/2, r, s, t > 0, r + s + t = n.

Original entry on oeis.org

157, 787, 3307, 19687, 12757, 347287, 267907, 3125587, 2870437, 5166787, 25833937, 590736037, 232505437, 2712563437, 13562817187, 3766588087, 52313723437, 726579492187, 332213069317, 847482319687, 4237411598437, 115351760179687, 88985643567187, 68646067894687
Offset: 4

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Examples

			For exponent sum n = 3 no prime exists, (3*5*7-1)/2 = 52 is composite.
a(4) = 157: (3^2*5*7-1)/2 is the least prime with exponent sum n = 4.
a(5) = 787: there are 6 ways to choose the exponents of 3, 5, 7 with sum n = 5, i.e., [3,1,1], [1,3,1], [1,1,3], [2,2,1], [2,1,2], [1,2,2]. (3^3*5*7-1)/2 = 472 is composite, but (3^2*5^2*7-1)/2 = 787 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[Min[Select[(3^#[[1]] 5^#[[2]] 7^#[[3]]-1)/2&/@Flatten[Permutations/@ IntegerPartitions[n,{3}],1],PrimeQ]],{n,30}]/.\[Infinity]->Nothing (* Harvey P. Dale, Oct 29 2020 *)
  • PARI
    seqpp(np0,np,add,lim) = {for(m=np0,lim, my(pmin=oo); forpart(V=m, forperm(np,P, my(p=(prod(k=1,np,prime(k+1)^V[P[k]])+add)/2); if(isprime(p), pmin=min(pmin,p))), [1,m-np+1],[np,np]); print1(pmin,", "))};
    seqpp(4,3,-1,27)