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.

Previous Showing 11-20 of 34 results. Next

A235365 Smallest odd prime factor of 3^n + 1, for n > 1.

Original entry on oeis.org

5, 7, 41, 61, 5, 547, 17, 7, 5, 67, 41, 398581, 5, 7, 21523361, 103, 5, 2851, 41, 7, 5, 23535794707, 17, 61, 5, 7, 41, 523, 5, 6883, 926510094425921, 7, 5, 61, 41, 18427, 5, 7, 17, 33703, 5, 82064241848634269407, 41, 7, 5, 16921, 76801, 547, 5, 7, 41, 78719947, 5, 61, 17, 7, 5, 3187, 41
Offset: 2

Views

Author

Jonathan Sondow, Jan 19 2014

Keywords

Comments

Levi Ben Gerson (1288-1344) proved that 3^n + 1 = 2^m has no solution in integers if n > 1, by showing that 3^n + l has an odd prime factor. His proof uses remainders after division of powers of 3 by 8 and powers of 2 by 8; see the Lenstra and Peterson links. For an elegant short proof, see the Franklin link.

Examples

			3^2 + 1 = 10 = 2*5, so a(2) = 5.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Chelsea, NY 1992; see p. 731.

Crossrefs

See A235366 for 3^n - 1.
Cf. also A003586 (products 2^m * 3^n), A006899, A061987, A108906.

Programs

  • Magma
    [PrimeDivisors(3^n +1)[2]: n in [2..60] ] ; // Vincenzo Librandi, Mar 16 2019
  • Mathematica
    Table[FactorInteger[3^n + 1][[2, 1]], {n, 2, 50}]

Formula

a(2+4n) = 5 as 3^(2+4n) + 1 = (3^2)*(3^4)^n + 1 = 9*81^n + 1 = 9*(80+1)^n + 1 == 9 + 1 == 0 (mod 5).
a(3+6n) = 7 as 3^(3+6n) + 1 = (3^3)*(3^6)^n + 1 = 27*729^n + 1 = 27*(728+1)^n + 1 == 27 + 1 == 0 (mod 7), but 27 * 729^n + 1 == 2*(-1)^n + 1 !== 0 (mod 5).

Extensions

Terms to a(132) in b-file from Vincenzo Librandi, Mar 16 2019
a(133)-a(658) in b-file from Amiram Eldar, Feb 05 2020
a(659)-a(768) in b-file from Max Alekseyev, Apr 27 2022

A085239 Sort the numbers 2^i and 3^j. Then a(n) is the base of the n-th term. Set a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 22 2003

Keywords

Comments

The density of 2's in this sequence is log(3)/log(6). The density of 3's in this sequence is log(2)/log(6). - Jennifer Buckley, Apr 24 2024

Crossrefs

Programs

  • Haskell
    a085239 1 = 1
    a085239 n = a006899 n `mod` 2 + 2  -- Reinhard Zumkeller, Oct 09 2013
    
  • Mathematica
    m = 40;
    Join[{1}, If[Total[IntegerDigits[#, 2]] == 1, 2, 3]& /@ Union[3^Range[m], 2^Range[Length[IntegerDigits[3^m, 2]] - 1]]] (* Jean-François Alcover, Oct 07 2021 *)
  • PARI
    upto(L) = my(v2=2, v3=1, r=List(1)); while(v3Ruud H.G. van Tol, May 10 2024
    
  • Python
    from sympy import integer_log
    def A085239(n): return 1 if n==1 else 2 if 6**integer_log(m:=3**(n-1),6)[0]<<1Chai Wah Wu, Feb 04 2025

Formula

A006899(n) = a(n)^A085238(n).
For n > 1: a(n) = 2 + A006899(n) mod 2. - Reinhard Zumkeller, Oct 09 2013

A086410 Smallest prime factor of 3-smooth numbers, with a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 18 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Reap[For[n = 1, n <= 2*10^5, n++, If[EulerPhi[6*n] == 2*n, Sow[ FactorInteger[n][[1, 1]]]]]][[2, 1]] (* Jean-François Alcover, Sep 02 2016 *)

Formula

a(n) = A020639(A003586(n));
a(n) <= A086411(n) <= 3.
a(A033845(n)) = A086411(A033845(n))-1; a(A006899(n)) = A086411(A006899(n)). - Reinhard Zumkeller, Sep 25 2008

A086411 Greatest prime factor of 3-smooth numbers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 18 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Reap[Do[p = FactorInteger[n][[-1, 1]]; If[p < 5, Sow[p]], {n, 1, 2*10^5}] ][[2, 1]] (* Jean-François Alcover, Dec 17 2017 *)

Formula

a(n) = A006530(A003586(n)).
A086410(n) <= a(n) <= 3.
a(A033845(n)) = A086410(A033845(n))+1; a(A006899(n)) = A086410(A006899(n)). - Reinhard Zumkeller, Sep 25 2008
Conjecture: a(n) = A049237(n+1) for n>1. - R. J. Mathar, Jun 06 2024

A085238 Sort the numbers 2^i and 3^j. Then a(n) is the exponent of the n-th term.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 4, 3, 5, 6, 4, 7, 5, 8, 9, 6, 10, 11, 7, 12, 8, 13, 14, 9, 15, 10, 16, 17, 11, 18, 19, 12, 20, 13, 21, 22, 14, 23, 15, 24, 25, 16, 26, 17, 27, 28, 18, 29, 30, 19, 31, 20, 32, 33, 21, 34, 22, 35, 36, 23, 37, 38, 24, 39, 25, 40, 41, 26, 42, 27, 43, 44, 28
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 22 2003

Keywords

Crossrefs

Programs

  • Haskell
    a085238 n = e (mod x 2 + 2) x where
       x = a006899 n
       e b p = if p == 1 then 0 else 1 + e b (p `div` b)
    -- Reinhard Zumkeller, Oct 09 2013
    
  • Mathematica
    seq[lim_] := Module[{r2 = Range[0, Floor[Log2[lim]]], r3 = Range[0, Floor[Log[3, lim]]]}, Rest@ SortBy[Join[{#, 2^#} & /@ r2, {#, 3^#} & /@ r3], Last][[;; , 1]]]; seq[10^14] (* Amiram Eldar, Mar 25 2025 *)
  • PARI
    do(lim)=my(v=List(vector(logint(lim\=1,2),i,1<my(t=valuation(n,2)); if(t, t, valuation(n,3)), Set(v)) \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from sympy import integer_log
    def A085238(n): return k+1 if 6**(k:=integer_log(m:=3**(n-1),6)[0])<<1Chai Wah Wu, Feb 04 2025

Formula

A006899(n) = A085239(n)^a(n).
a(A085240(n)) = a(n).

A306044 Powers of 2, 3 and 5.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 16, 25, 27, 32, 64, 81, 125, 128, 243, 256, 512, 625, 729, 1024, 2048, 2187, 3125, 4096, 6561, 8192, 15625, 16384, 19683, 32768, 59049, 65536, 78125, 131072, 177147, 262144, 390625, 524288, 531441, 1048576, 1594323, 1953125, 2097152, 4194304, 4782969, 8388608
Offset: 1

Views

Author

Zak Seidov, Jun 18 2018

Keywords

Comments

Union of A000079, A000244 and A000351.

Crossrefs

Programs

  • Maple
    N:= 10^7: # for terms <= N
    sort(convert(`union`(seq({seq(b^i,i=0..ilog[b](N))},b=[2,3,5])),list)); # Robert Israel, Nov 18 2022
  • Mathematica
    Union[2^Range[0, Log2[5^10]], 3^Range[Log[3, 5^10]], 5^Range[10]]
  • PARI
    setunion(setunion(vector(logint(N=10^6,5)+1,k,5^(k-1)), vector(logint(N,3),k,3^k)), vector(logint(N,2),k,2^k)) \\ M. F. Hasler, Jun 24 2018
    
  • PARI
    a(n)= my(f=[2,3,5],q=sum(k=1,#f,1/log(f[k]))); for(i=1,#f, my(p=logint(exp(n/q),f[i]),d=0,j=0,m=0); while(jRuud H.G. van Tol, Nov 16 2022 (with the help of the pari-users mailing list) Observation: with f=primes(P), d <= logint(P,2).
    
  • Python
    from sympy import integer_log
    def A306044(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-x.bit_length()-integer_log(x,3)[0]-integer_log(x,5)[0]
        return bisection(f,n,n) # Chai Wah Wu, Feb 05 2025

Formula

Sum_{n>=1} 1/a(n) = 11/4. - Amiram Eldar, Dec 10 2022

A098293 Powers of 2 alternating with powers of 3.

Original entry on oeis.org

1, 1, 2, 3, 4, 9, 8, 27, 16, 81, 32, 243, 64, 729, 128, 2187, 256, 6561, 512, 19683, 1024, 59049, 2048, 177147, 4096, 531441, 8192, 1594323, 16384, 4782969, 32768, 14348907, 65536, 43046721, 131072, 129140163, 262144, 387420489, 524288
Offset: 0

Views

Author

Wolfdieter Lang, Oct 18 2004

Keywords

Comments

The finite sequence [1,2,3,4,9,8,27] is used in Timaios [35b] by Platon.

References

  • Luc Brisson, Le Même et l'Autre dans la Structure Ontologique du Timée de Platon, Klincksieck, Paris, 1974, p. 317.

Crossrefs

Except for initial 1, reordering of A006899.

Programs

Formula

a(2*k) = 2^k, a(2*k+1) = 3^k, k>=0.
G.f.: (1+x-3*x^2-2*x^3)/((1-2*x^2)*(1-3*x^2)).
a(n) = ((5-(-1)^n)/2)^((2*n-1+(-1)^n)/4). - Luce ETIENNE, Dec 13 2014

A186927 Lesser of two consecutive 3-smooth numbers having no common divisors.

Original entry on oeis.org

1, 2, 3, 8, 27, 243, 2048, 524288, 129140163, 68630377364883, 36472996377170786403, 19342813113834066795298816, 706965049015104706497203195837614914543357369, 13703277223523221219433362313025801636536040755174924956117940937101787
Offset: 1

Views

Author

Keywords

Comments

a(n) = A003586(A186771(n)); A186928(n) = A003586(A186771(n) + 1).
Subsequence of A006899: all terms are either powers of 2 or of 3.
Najman improves an algorithm of Bauer & Bennett for computing the function that measures the minimal gap size f(k) in the sequence of integers at least one of whose prime factors exceeds k. This allows us to compute values of f(k) for larger k and obtain new values of f(k). - Jonathan Vos Post, Aug 18 2011

Crossrefs

Cf. A186711.

Programs

  • Mathematica
    smoothNumbers[p_, max_] := Module[{a, aa, k, pp, iter}, k = PrimePi[p]; aa = Array[a, k]; pp = Prime[Range[k]]; iter = Table[{a[j], 0, PowerExpand @ Log[pp[[j]], max/Times @@ (Take[pp, j - 1]^Take[aa, j - 1])]}, {j, 1, k}]; Table[Times @@ (pp^aa), Sequence @@ iter // Evaluate] // Flatten // Sort]; sn = smoothNumbers[3, 10^100]; Reap[For[i = 1, i <= Length[sn] - 1, i++, If[CoprimeQ[sn[[i]], sn[[i + 1]]], Sow[sn[[i]]]]]][[2, 1]] (* Jean-François Alcover, Nov 11 2016 *)

A186928 Greater of two consecutive 3-smooth numbers having no common divisors.

Original entry on oeis.org

2, 3, 4, 9, 32, 256, 2187, 531441, 134217728, 70368744177664, 36893488147419103232, 19383245667680019896796723, 713623846352979940529142984724747568191373312, 13803492693581127574869511724554050904902217944340773110325048447598592
Offset: 1

Views

Author

Keywords

Comments

a(n) = A003586(A186771(n) + 1); A186927(n) = A003586(A186771(n));
also a subsequence of A006899: all terms are either powers of 2 or of 3.

Crossrefs

Subsequence of A006899.
Cf. A186711.

Programs

  • Mathematica
    smoothNumbers[p_, max_] := Module[{a, aa, k, pp, iter}, k = PrimePi[p]; aa = Array[a, k]; pp = Prime[Range[k]]; iter = Table[{a[j], 0, PowerExpand @ Log[pp[[j]], max/Times @@ (Take[pp, j - 1]^Take[aa, j - 1])]}, {j, 1, k}]; Table[Times @@ (pp^aa), Sequence @@ iter // Evaluate] // Flatten // Sort]; sn = smoothNumbers[3, 10^100]; Reap[For[i = 1, i <= Length[sn] - 1, i++, If[CoprimeQ[sn[[i]], sn[[i + 1]]], Sow[sn[[i + 1]]]]]][[2, 1]] (* Jean-François Alcover, Nov 11 2016 *)

A236210 Pairs of "harmonic numbers" 2^m * 3^n that differ by 1.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 8, 9
Offset: 1

Views

Author

Jonathan Sondow, Jan 20 2014

Keywords

Comments

Philippe de Vitry (1291-1361), a musician from Vitry-en-Artois in France, called numbers of the form 2^m * 3^n "harmonic numbers". He asked if all powers of 2 and 3 differ by more than 1 except the pairs 1 and 2, 2 and 3, 3 and 4, 8 and 9 (which correspond to musically significant ratios, representing an octave, fifth, fourth, and whole tone). Levi Ben Gerson (1288-1344) answered yes by proving that 3^n +- 1 is not a power of 2 if n > 2; see A235365, A235366.

Examples

			8 + 1 = 2^3 + 1 = 3^2 = 9, so the pair 8 and 9 is in the sequence.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Chelsea, NY 1992; see p. 731.

Crossrefs

Previous Showing 11-20 of 34 results. Next