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

A181715 Length of the complete Cunningham chain of the second kind starting with prime(n).

Original entry on oeis.org

3, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 17 2010

Keywords

Comments

Number of iterations x -> 2x-1 needed to get a composite number, when starting with prime(n).
Dickson's conjecture implies that, for every positive integer r, there exist infinitely many n such that a(n) = r. - Lorenzo Sauras Altuzarra, Feb 12 2021
a(n) is the least k such that 2^k * (prime(n)-1) + 1 is composite. Note that a(n) is well defined since 2^(p-1) * (p-1) + 1 is divisible by p for odd primes p. - Jianing Song, Nov 24 2021

Examples

			2 -> 3 -> 5 -> 9 = 3^2, so a(1) = 3 and a(2) = 2. - _Jonathan Sondow_, Oct 30 2015
		

Crossrefs

Programs

  • Maple
    a := proc(n)
       local c, l:
       c, l := 0, ithprime(n):
       while isprime(l) do c, l := c+1, 2*l-1: od:
       c:
    end: # Lorenzo Sauras Altuzarra, Feb 12 2021
  • Mathematica
    Table[p = Prime[n]; cnt = 1; While[p = 2*p - 1; PrimeQ[p], cnt++]; cnt, {n, 100}] (* T. D. Noe, Jul 12 2012 *)
    Table[-1 + Length@ NestWhileList[2 # - 1 &, Prime@ n, PrimeQ@ # &], {n, 98}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    a(n)= n=prime(n); for(c=1,1e9, is/*pseudo*/prime(n=2*n-1) || return(c))

Formula

a(n) < prime(n) for n > 1; see Löh (1989), p. 751. - Jonathan Sondow, Oct 28 2015
max(a(n), A181697(n)) = A263879(n) for n > 2. - Jonathan Sondow, Oct 30 2015
a(n) = A285700(A000040(n)). - Antti Karttunen, Apr 26 2017

Extensions

Escape clause added to definition by N. J. A. Sloane, Feb 19 2021
Escape clause deleted from definition by Jianing Song, Nov 24 2021

A278229 Least number with the prime signature of 2*prime(n) - 1.

Original entry on oeis.org

2, 2, 4, 2, 6, 4, 6, 2, 12, 6, 2, 2, 16, 6, 6, 30, 12, 4, 6, 6, 6, 2, 30, 6, 2, 6, 6, 6, 6, 36, 6, 12, 30, 2, 24, 6, 2, 12, 12, 30, 30, 4, 6, 30, 6, 2, 2, 6, 6, 2, 30, 12, 6, 6, 24, 60, 6, 2, 6, 30, 6, 60, 2, 24, 16, 6, 2, 2, 60, 6, 30, 6, 2, 6, 2, 60, 30, 6, 12, 6, 24, 4, 30, 6, 2, 30, 30, 6, 6, 12, 6, 30, 6, 12, 2, 30, 12, 6, 30, 6, 2, 30, 72, 6, 6, 2, 30, 30
Offset: 1

Views

Author

Antti Karttunen, Nov 19 2016

Keywords

Crossrefs

Cf. A137288 (positions of 2's), A005382.
Cf. also A278227, A278228, A278230.

Programs

  • Mathematica
    Table[Times @@ MapIndexed[(Prime@ First@ #2)^#1 &, #] &@ If[Length@ # == 1 && #[[1, 1]] == 1, {0}, Reverse@ Sort@ #[[All, -1]]] &@ FactorInteger[ 2 Prime@ n - 1], {n, 120}] (* Michael De Vlieger, Nov 21 2016 *)
  • Scheme
    (define (A278229 n) (A046523 (+ -1 (* 2 (A000040 n)))))

Formula

a(n) = A046523(A076274(n)) = A046523((2*A000040(n))-1).

A285706 a(n) = number of iterations x -> A064216(x) needed to reach a nonprime number when starting from prime(n), a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

Length (or size for the closed cycles: [2] and [3]) of the complete "slipping Cunningham chain of the second kind" starting with prime(n). That is, at the end of every step, the next prime q = 2p-1 "slips" by one step towards smaller primes as A064989(q).
After n = 1, 2 (primes 2 & 3) differs from A181715 for the first time at n=22, where a(22) = 2, while A181715(22) = 3, prime(22) = 79.

Examples

			See examples in A285701.
		

Crossrefs

Cf. A137288 (gives the positions of terms > 1 after its two initial terms).

Programs

  • Mathematica
    Table[If[n <= 2, 1, -1 + Length@ NestWhileList[Apply[Times, FactorInteger[2 # - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e] &, Prime@ n, PrimeQ@ # &]], {n, 120}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    A285706(n) = A285701(prime(n)); \\ The rest of code in A285701.
    
  • Scheme
    (define (A285706 n) (A285701 (A000040 n)))

Formula

a(n) = A285701(A000040(n)).

A023583 Greatest prime divisor of 2*prime(n)-1.

Original entry on oeis.org

3, 5, 3, 13, 7, 5, 11, 37, 5, 19, 61, 73, 3, 17, 31, 7, 13, 11, 19, 47, 29, 157, 11, 59, 193, 67, 41, 71, 31, 5, 23, 29, 13, 277, 11, 43, 313, 13, 37, 23, 17, 19, 127, 11, 131, 397, 421, 89, 151, 457, 31, 53, 37, 167, 19, 7, 179, 541, 79, 17, 113, 13, 613, 23, 5
Offset: 1

Views

Author

Keywords

Comments

a(n) = 2*prime(n)-1 if n is in A137288. - Robert Israel, May 19 2020

Crossrefs

Programs

  • Maple
    f:= n -> max(numtheory:-factorset(2*ithprime(n)-1)):
    map(f, [$1..100]); # Robert Israel, May 19 2020
  • Mathematica
    a[n_] := FactorInteger[2*Prime[n]-1][[-1, 1]]; Array[a, 100] (* Amiram Eldar, Oct 27 2024 *)
  • PARI
    a(n) = {my(f = factor(2*prime(n)-1)); f[#f~, 1];} \\ Amiram Eldar, Oct 27 2024

Formula

a(n) = A006530(A076274(n+1)). - Bernard Schott, May 20 2020

Extensions

Name edited by Robert Israel, May 19 2020

A307368 a(n) is the minimal positive integer such that 2*a(n)*prime(n)-1 equals another prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 2, 1, 3, 3, 1, 1, 2, 3, 3, 2, 3, 4, 3, 2, 7, 1, 2, 8, 1, 5, 3, 3, 3, 3, 3, 2, 2, 1, 5, 6, 1, 3, 5, 2, 5, 4, 11, 4, 2, 1, 1, 4, 2, 1, 8, 3, 7, 6, 6, 2, 3, 1, 6, 2, 3, 2, 1, 5, 3, 3, 1, 1, 3, 4, 5, 3, 1, 3, 1, 2, 3, 3, 11, 4, 8, 6, 2, 4, 1, 3, 3, 3, 6, 3, 2, 5, 6, 5, 1, 2, 9, 2, 3, 4, 1, 5, 2, 3, 4, 1, 2, 2, 3
Offset: 1

Views

Author

Ivan N. Ianakiev, Apr 17 2019

Keywords

Comments

A more general form of Rassias's conjecture states that for every positive integer a there are two primes p and q such that 2*a*p = q+1.
a(n)=1 for n in A137288. - Robert Israel, Apr 18 2019
By Dirichlet's theorem on primes in arithmetic progressions, a(n) exists. - Robert Israel, May 12 2019

References

  • Michael Th. Rassias, Problem-Solving and Selected Topics in Number Theory, Springer-Verlag, NY, 2011, pp. xi-xii.

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,p;
        p:= ithprime(n);
        for k from 1 do
          if isprime(2*k*p-1) then return k fi
        od
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 18 2019
  • Mathematica
    a[n_]:=Module[{a=1},While[!PrimeQ[2*a*Prime[n]-1],a++];a];
    a/@Range[110]
  • PARI
    a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(2*k*p-1), return(k))) \\ Felix Fröhlich, Apr 17 2019

Formula

a(n) = A053989(A000040(n))/2 for n <> 3. - Robert Israel, Apr 18 2019
Showing 1-5 of 5 results.