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.

A087274 Prime index of the largest prime factor of 3*prime(n)+1.

Original entry on oeis.org

4, 3, 1, 5, 7, 3, 6, 10, 4, 5, 15, 4, 11, 6, 20, 3, 24, 9, 26, 28, 5, 7, 3, 19, 21, 8, 11, 9, 13, 7, 43, 45, 27, 8, 4, 49, 17, 4, 54, 6, 57, 7, 13, 10, 12, 9, 66, 19, 11, 14, 4, 72, 42, 10, 44, 22, 26, 12, 6, 47, 7, 5, 89, 91, 15, 7, 20, 9, 98, 32, 16, 5, 10, 4, 104, 9, 21, 35, 14, 63, 12, 22
Offset: 1

Views

Author

Labos Elemer, Sep 18 2003

Keywords

Examples

			n=10: prime(10)=29, max-p-factor(88)=11, pi(11)=5=a(10)<n;
n=11: prime(11)=31, max-p-factor(94)=47, pi(47)=15=a(11)>n;
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; ma[x_] := Part[Reverse[ffi[x]], 2]; Table[PrimePi[ma[3*Prime[w]+1]], {w, 1, 100}]
  • PARI
    a(n) = primepi(vecmax(factor(3*prime(n)+1)[, 1])); \\ Michel Marcus, Mar 27 2020

Formula

a(n) = A000720(A006530(1+3*A000040(n))).
a(n) = A000720(A087273(n)). - Amiram Eldar, Jul 12 2024

A087963 Exponent of highest power of 2 dividing 3*prime(n)+1.

Original entry on oeis.org

0, 1, 4, 1, 1, 3, 2, 1, 1, 3, 1, 4, 2, 1, 1, 5, 1, 3, 1, 1, 2, 1, 1, 2, 2, 4, 1, 1, 3, 2, 1, 1, 2, 1, 6, 1, 3, 1, 1, 3, 1, 5, 1, 2, 4, 1, 1, 1, 1, 4, 2, 1, 2, 1, 2, 1, 3, 1, 6, 2, 1, 4, 1, 1, 2, 3, 1, 2, 1, 3, 2, 1, 1, 5, 1, 1, 4, 3, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 3, 1, 2, 1
Offset: 1

Views

Author

Labos Elemer, Sep 18 2003

Keywords

Examples

			For n = 10: p = prime(10) = 29, 3*p + 1 = 88 = 2^3 * 11, a(10) = 3.
		

Crossrefs

Programs

  • Magma
    [Valuation(3*NthPrime(n)+1, 2): n in [1..80]]; // Vincenzo Librandi, Sep 01 2016
    
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; e2[x_] := Part[[ffi[x]], 2]; Table[e2[3*Prime[w]+1], {w, 1, 100}]
    IntegerExponent[3 * Prime[Range[100]] + 1, 2] (* Amiram Eldar, Jul 12 2024 *)
  • PARI
    a(n) = valuation(3*prime(n)+1, 2); \\ Michel Marcus, Sep 01 2016
    
  • Python
    from sympy import prime
    def A087963(n): return (~(m:=prime(n)*3+1)&m-1).bit_length() # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A007814(3*prime(n)+1).

Extensions

a(1)=0 corrected by Michel Marcus, Sep 01 2016

A087964 a(n) is the least prime p such that exponent of highest power of 2 dividing 3p+1 equals n.

Original entry on oeis.org

3, 17, 13, 5, 53, 149, 1237, 1109, 853, 2389, 3413, 17749, 128341, 70997, 251221, 415061, 218453, 2708821, 27088213, 29709653, 3495253, 85284181, 13981013, 39146837, 794121557, 1498764629, 492131669, 626349397, 13779686741
Offset: 1

Views

Author

Labos Elemer, Sep 18 2003

Keywords

Examples

			p = 218453 is the first prime so that 3*p+1 = 655360 = (2^18)*5 has 18 as exponent of 2 in 3p+1, thus a(18) = 218453.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
       local m,t,p;
       t:= 2^n;
       for m from 1 + 4*(n mod 2) by 6 do
         p:= (t*m-1)/3;
         if isprime(p) then return p fi
       od
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 18 2017
  • Mathematica
    a[n_] := Module[{m, t = 2^n, p}, For[m = 1 + 4 Mod[n, 2], True, m += 6, p = (t m - 1)/3; If[PrimeQ[p], Return[p]]]];
    Array[a, 100] (* Jean-François Alcover, Aug 28 2020, after Robert Israel *)

Formula

a(n) = A000040(Min{x; A007814(1 + 3*A000040(x)) = n}).

Extensions

More terms from Ray Chandler, Sep 21 2003

A276827 Primes p such that the greatest prime factor of 3*p+1 is at most 5.

Original entry on oeis.org

3, 5, 13, 53, 83, 853, 2083, 3413, 5333, 85333, 208333, 218453, 341333, 3495253, 5461333, 8533333, 13981013, 83333333, 853333333, 22369621333, 218453333333, 341333333333, 2236962133333, 3665038759253, 53333333333333, 91625968981333, 203450520833333, 1333333333333333
Offset: 1

Views

Author

Robert Israel, Sep 19 2016

Keywords

Comments

Prime(i) such that A087273(i) <= 5.

Crossrefs

Cf. A087273.
Contains A093671, A093674, and A093676.

Programs

  • Maple
    N = 10^20: # to get all terms <= N
    Res:= {}:
    for a from 0 to ilog2(floor((3*N+1)/5)) do
      twoa:= 2^a;
      for b from (a mod 2) by 2 do
        p:= (twoa*5^b-1)/3;
        if p > N then break fi;
        if isprime(p) then
          Res:= Res union {p};
        fi
    od od:
    sort(convert(Res,list));
  • Mathematica
    Select[Prime@ Range[10^6], FactorInteger[3 # + 1][[-1, 1]] <= 5 &] (* Michael De Vlieger, Sep 19 2016 *)
  • PARI
    list(lim)=my(v=List(),s,t); lim=lim\1*3 + 1; for(i=0,logint(lim\2,5), t=if(i%2,2,4)*5^i; while(t<=lim, if(isprime(p=t\3), listput(v,p)); t<<=2)); Set(v) \\ Charles R Greathouse IV, Sep 19 2016

A276357 Primes of the form (p*2^x-1)/3, where p is also prime and x is a positive integer.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 41, 47, 53, 59, 61, 67, 71, 89, 97, 101, 109, 127, 131, 137, 149, 151, 157, 167, 179, 181, 197, 211, 229, 239, 241, 257, 269, 277, 281, 307, 311, 347, 349, 379, 389, 397, 409, 421, 431, 439, 449, 461, 467, 479, 509, 547, 571, 577, 587
Offset: 1

Views

Author

Michael Cader Nelson, Aug 31 2016

Keywords

Comments

Relationship to Collatz (3x+1) problem: when one of these primes appears in a hailstone sequence, the next odd number in the sequence must be prime. - Michael Cader Nelson, Jul 03 2020

Examples

			3 is in the sequence because 3 = (5*2^1-1)/3 and both 3 and 5 are prime numbers; while 23 is not in the sequence because the only positive integer values (p,x) to give 23 are (35,1) and 35 is not prime.
		

Crossrefs

Cf. A087273, A087963. A177330 (lists all exponents x).

Programs

  • Mathematica
    mx = 590; Select[ Sort@ Flatten@ Table[(Prime[p]*2^x - 1)/3, {x, Log2[mx/3]}, {p, PrimePi[3 mx/2^x]}], PrimeQ] (* Robert G. Wilson v, Nov 01 2016 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, z = 3*p+1; x = valuation(z, 2); for (ex = 1, x, if (isprime(z/2^ex), print1(p, ", "); break;);););} \\ Michel Marcus, Sep 01 2016

Formula

The value of p is (3*a(n)+1)/2^x as well as the respective term in A087273 evaluated for a(n), while the value of x is the related exponent in A087963 unless 3*a(n)+1 is a power of 2 (e.g., n = 1).

Extensions

Corrected and extended by Michel Marcus, Sep 01 2016
Showing 1-5 of 5 results.