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-2 of 2 results.

A034881 a(1) = 1; for n>1, a(n) = smallest integer > a(n-1) such that a(n)*a(i)+1 is prime for all 1 <= i <= n-1.

Original entry on oeis.org

1, 2, 6, 18, 30, 270, 606, 123120, 888456, 23070450, 238550160, 8282903640, 72789145650, 15681266370000, 18216437241240
Offset: 1

Views

Author

Keywords

Comments

a(16) > 2*10^16.
a(n) exists for every n if Dickson's conjecture is true. - Charles R Greathouse IV, Nov 30 2012

Examples

			After a(1)=1, a(2)=2, a(3)=6, we want m, the smallest number >6 such that m+1, 2m+1 and 6m+1 are all prime: this is m = 18 = a(4).
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{k = s[[-1]] + 1, m = s}, While[ Union@ PrimeQ[k*m + 1] != {True}, k++]; Append[s, k]]; Nest[f, {1}, 10] (* Robert G. Wilson v, Dec 02 2012 *)

Extensions

a(9)-a(13) found by Phil Carmody.
a(14)-a(15) from Don Reble, Oct 15 2012
Edited by N. J. A. Sloane, Dec 01 2012

A219953 a(1) = 1; for n > 1, a(n) = smallest integer > a(n-1) such that a(n)*a(i)+1 is semiprime for all 1 <= i <= n-1.

Original entry on oeis.org

1, 3, 8, 38, 86, 318, 504, 3600, 8132, 83160, 116850, 202272, 399126, 6190086, 8756916, 25253676, 309709400, 1112878446, 1478724036, 11062089360, 97331025386
Offset: 1

Views

Author

Jonathan Vos Post, Dec 01 2012

Keywords

Comments

This is to A034881 as semiprimes A001358 are to primes A000040.
a(20) > 6*10^9. - Giovanni Resta, Jul 26 2015

Examples

			a(1) = 1 by definition.
a(2) = 3: 3 > 1, and 1*3 + 1 = 4 = 2^2 is semiprime.
a(3) = 8: 8 > 3, and 1*8 + 1 = 9 = 3^2 is semiprime, and 3*8 + 1 = 25 = 5^2 is semiprime.
a(4) = 38: 38 > 8, and 1*38 + 1 = 39 = 3*13 is semiprime, and 3*38 + 1 = 115 = 5*23 is semiprime, and 8*38 + 1 = 305 = 5*61 is semiprime.
From _Michel Marcus_, Jul 26 2015: (Start)
The resulting semiprimes are:
    4;
    9,  25;
   39, 115,  305;
   87, 259,  689,  3269;
  319, 955, 2545, 12085, 27349;
  ...
(End)
		

Crossrefs

Programs

  • Maple
    A219953 := proc(n)
        option remember;
        if n= 1 then
            1;
        else
            for a from procname(n-1)+1 do
                issp := true ;
                for i from 1 to n-1 do
                    if numtheory[bigomega]( a*procname(n-i)+1) = 2 then
                        ;
                    else
                        issp := false;
                        break ;
                    end if;
                end do:
                if issp then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Dec 15 2012
  • Mathematica
    a = {1}; Do[k = a[[n - 1]] + 1; While[! AllTrue[(k a[[n - #]] + 1) & /@ Range@ (n - 1), Total[Last /@ FactorInteger@ #] == 2 &], k++]; AppendTo[a, k], {n, 2, 13}]; a (* Michael De Vlieger, Jul 26 2015, Version 10 *)
  • PARI
    ok(v, n, k) = {v[n] = k; for (j=1, n-1, if (bigomega(1+v[n]*v[j]) != 2, return (0));); return (1);}
    lista(nn) = {print1(k=1, ", "); v = [k]; for (n=2, nn, k = v[n-1]+1; v = concat(v, k); while (! ok(v, n, k), k++); v[n] = k; print1(k, ", "););} \\ Michel Marcus, Jul 26 2015

Extensions

a(14)-a(17) from Luke March, Jul 26 2015
a(18)-a(19) from Giovanni Resta, Jul 26 2015
a(20)-a(21) from Tyler Busby, Jan 31 2023
Showing 1-2 of 2 results.