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

A027746 Irregular triangle in which first row is 1, n-th row (n>1) gives prime factors of n with repetition.

Original entry on oeis.org

1, 2, 3, 2, 2, 5, 2, 3, 7, 2, 2, 2, 3, 3, 2, 5, 11, 2, 2, 3, 13, 2, 7, 3, 5, 2, 2, 2, 2, 17, 2, 3, 3, 19, 2, 2, 5, 3, 7, 2, 11, 23, 2, 2, 2, 3, 5, 5, 2, 13, 3, 3, 3, 2, 2, 7, 29, 2, 3, 5, 31, 2, 2, 2, 2, 2, 3, 11, 2, 17, 5, 7, 2, 2, 3, 3, 37, 2, 19, 3, 13, 2, 2, 2, 5, 41, 2, 3, 7, 43, 2, 2, 11, 3, 3, 5
Offset: 1

Views

Author

Keywords

Comments

n-th row has length A001222(n) (n>1).

Examples

			Triangle begins
  1;
  2;
  3;
  2, 2;
  5;
  2, 3;
  7;
  2, 2, 2;
  3, 3;
  2, 5;
  11;
  2, 2, 3;
  ...
		

Crossrefs

a(A022559(A000040(n))+1) = A000040(n).
Column 1 is A020639, columns 2 and 3 correspond to A014673 and A115561.
A281890 measures frequency of each prime in each column, with A281889 giving median values.
Cf. A175943 (partial products), A265110 (partial row products), A265111.

Programs

  • Haskell
    import Data.List (unfoldr)
    a027746 n k = a027746_tabl !! (n-1) !! (k-1)
    a027746_tabl = map a027746_row [1..]
    a027746_row 1 = [1]
    a027746_row n = unfoldr fact n where
       fact 1 = Nothing
       fact x = Just (p, x `div` p) where p = a020639 x
    -- Reinhard Zumkeller, Aug 27 2011
    
  • Maple
    P:=proc(n) local FM: FM:=ifactors(n)[2]: seq(seq(FM[j][1],k=1..FM[j][2]),j=1..nops(FM)) end: 1; for n from 2 to 45 do P(n) od; # yields sequence in triangular form; Emeric Deutsch, Feb 13 2005
  • Mathematica
    row[n_] := Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]; Flatten[ Table[ row[n], {n, 1, 45}]] (* Jean-François Alcover, Dec 01 2011 *)
  • PARI
    A027746_row(n,o=[1])=if(n>1,concat(apply(t->vector(t[2],i,t[1]), Vec(factor(n)~))),o) \\ Use %(n,[]) if you want the more natural [] for the first row. - M. F. Hasler, Jul 29 2015
    
  • Python
    def factors(n: int) -> list[int]:
        p = n
        L:list[int] = []
        for f in range(2, p + 1):
            if f * f > p: break
            while True:
                q, r = divmod(p, f)
                if r != 0: break
                L.append(f)
                p = q
                if p == 1: return L
        L.append(p)
        return L  # Peter Luschny, Jul 18 2024
  • Sage
    v=[1]
    for k in [2..45]: v.extend(p for (p, m) in factor(k) for _ in range(m))
    print(v) # Giuseppe Coppoletta, Dec 29 2017
    

Formula

Product_{k=1..A001222(n)} T(n,k) = n.
From Reinhard Zumkeller, Aug 27 2011: (Start)
A001414(n) = Sum_{k=1..A001222(n)} T(n,k), n>1;
A006530(n) = T(n,A001222(n)) = Max_{k=1..A001222(n)} T(n,k);
A020639(n) = T(n,1) = Min_{k=1..A001222(n)} T(n,k). (End)

Extensions

More terms from James Sellers

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A005867 a(0) = 1; for n > 0, a(n) = (prime(n)-1)*a(n-1).

Original entry on oeis.org

1, 1, 2, 8, 48, 480, 5760, 92160, 1658880, 36495360, 1021870080, 30656102400, 1103619686400, 44144787456000, 1854081073152000, 85287729364992000, 4434961926979584000, 257227791764815872000, 15433667505888952320000
Offset: 0

Views

Author

Keywords

Comments

Local minima of Euler's phi function. - Walter Nissen
Number of potential primes in a modulus primorial(n+1) sieve. - Robert G. Wilson v, Nov 20 2000
Let p=prime(n) and let p# be the primorial (A002110), then it can be shown that any p# consecutive numbers have exactly a(n-1) numbers whose lowest prime factor is p. For a proof, see the "Proofs Regarding Primorial Patterns" link. For example, if we let p=7 and consider the interval [101,310] containing 210 numbers, we find the 8 numbers 119, 133, 161, 203, 217, 259, 287, 301. - Dennis Martin (dennis.martin(AT)dptechnology.com), Jul 16 2006
From Gary W. Adamson, Apr 21 2009: (Start)
Equals (-1)^n * (1, 1, 1, 2, 8, 48, ...) dot (-1, 2, -3, 5, -7, 11, ...).
a(6) = 480 = (1, 1, 1, 2, 8, 48) dot (-1, 2, -3, 5, -7, 11) = (-1, 2, -3, 10, -56, 528). (End)
It can be proved that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). This can show for example that at least 0.16*N numbers are primes less than N for 29^2 > N > 23^2. - Ben Paul Thurston, Aug 23 2010
First column of A096294. - Eric Desbiaux, Jun 20 2013
Conjecture: The g.f. for the prime(n+1)-rough numbers (A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063) is x*P(x)/(1-x-x^a(n)+x^(a(n)+1)), where P(x) is an order a(n) polynomial with symmetric coefficients (i.e., c(0)=c(n), c(1)=c(n-1), ...). - Benedict W. J. Irwin, Mar 18 2016
a(n)/A002110(n+1) (primorial(n+1)) is the ratio of natural numbers whose smallest prime factor is prime(n+1); i.e., prime(n+1) coprime to A002110(n). So the ratio of even numbers to natural numbers = 1/2; odd multiples of 3 = 1/6; multiples of 5 coprime to 6 (A084967) = 2/30 = 1/15; multiples of 7 coprime to 30 (A084968) = 8/210 = 4/105; etc. - Bob Selcoe, Aug 11 2016
The 2-adic valuation of a(n) is A057773(n), being sum of the 2-adic valuations of the product terms here. - Kevin Ryde, Jan 03 2023
For n > 1, a(n) is the number of prime(n+1)-rough numbers in [1, primorial(prime(n))]. - Alexandre Herrera, Aug 29 2023

Examples

			a(3): the mod 30 prime remainder set sieve representation yields the remainder set: {1, 7, 11, 13, 17, 19, 23, 29}, 8 elements.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A057773 (2-adic valuation).
Column 1 of A281890.

Programs

  • Haskell
    a005867 n = a005867_list !! n
    a005867_list = scanl (*) 1 a006093_list
    -- Reinhard Zumkeller, May 01 2013
  • Maple
    A005867 := proc(n)
        mul(ithprime(j)-1,j=1..n) ;
    end proc: # Zerinvary Lajos, Aug 24 2008, R. J. Mathar, May 03 2017
  • Mathematica
    Table[ Product[ EulerPhi[ Prime[ j ] ], {j, 1, n} ], {n, 1, 20} ]
    RecurrenceTable[{a[0]==1,a[n]==(Prime[n]-1)a[n-1]},a,{n,20}] (* Harvey P. Dale, Dec 09 2013 *)
    EulerPhi@ FoldList[Times, 1, Prime@ Range@ 18] (* Michael De Vlieger, Mar 18 2016 *)
  • PARI
    for(n=0, 22, print1(prod(k=1,n, prime(k)-1), ", "))
    

Formula

a(n) = phi(product of first n primes) = A000010(A002110(n)).
a(n) = Product_{k=1..n} (prime(k)-1) = Product_{k=1..n} A006093(n).
Sum_{n>=0} a(n)/A002110(n+1) = 1. - Bob Selcoe, Jan 09 2015
a(n) = A002110(n)-((1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1)). - Jamie Morken, Mar 27 2019
a(n) = |Sum_{k=0..n} A070918(n,k)|. - Alois P. Heinz, Aug 18 2019
a(n) = A058251(n)/A060753(n+1). - Jamie Morken, Apr 25 2022
a(n) = A002110(n) - A016035(A002110(n)) - 1 for n >= 1. - David James Sycamore, Sep 07 2024
Sum_{n>=0} 1/a(n) = A345974. - Amiram Eldar, Jun 26 2025

Extensions

Offset changed to 0, Name changed, and Comments and Examples sections edited by T. D. Noe, Apr 04 2010

A250477 Number of times prime(n) (the n-th prime) occurs as the least prime factor among numbers 1 .. (prime(n)^2 * prime(n+1)): a(n) = A078898(A251720(n)).

Original entry on oeis.org

6, 8, 12, 21, 33, 45, 63, 80, 116, 148, 182, 232, 265, 296, 356, 433, 490, 548, 625, 674, 740, 829, 919, 1055, 1187, 1252, 1313, 1376, 1446, 1657, 1897, 2029, 2134, 2301, 2484, 2605, 2785, 2946, 3110, 3301, 3439, 3654, 3869, 3978, 4086, 4349, 4811, 5147, 5273, 5395, 5604, 5787, 6049, 6403, 6684, 6954, 7153
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2014

Keywords

Comments

a(n) = Position of 6 on row n of array A249821. This is always larger than A250474(n), the position of 4 on row n, as 4 is guaranteed to be the first composite term on each row of A249821.
From Antti Karttunen, Mar 29 2015: (Start)
a(n) = 1 + number of positive integers <= (prime(n)*prime(n+1)) whose smallest prime factor is at least prime(n).
That a(n) > A250474(n) can also be seen by realizing that prime(n) must occur at least as many times as the smallest prime factor for the numbers in range 1 .. (prime(n)^2 * prime(n+1)) than for numbers in (smaller) range 1 .. (prime(n)^3), and also by realizing that a(n) cannot be equal to A250474(n) because each row of A249822 is a permutation of natural numbers.
Or more simply, by considering the comment given in A256447 which follows from the new interpretation given above.
(End)

Crossrefs

Column 6 of A249822. Cf. also A250474 (column 4), A250478 (column 8).
First differences: A256446. Cf. also A256447, A256448.

Programs

  • Mathematica
    f[n_] := Count[Range[Prime[n]^2*Prime[n + 1]], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 20] (* Michael De Vlieger, Mar 30 2015 *)
  • PARI
    allocatemem(234567890);
    A002110(n) = prod(i=1, n, prime(i));
    A250477(n) = { my(m); m = (prime(n) * prime(n+1)); sumdiv(A002110(n-1), d, (moebius(d)*(m\d))); };
    for(n=1, 23, print1(A250477(n),", "));
    \\ A more practical program:
    
  • PARI
    allocatemem(234567890);
    vecsize = (2^24)-4;
    v020639 = vector(vecsize);
    v020639[1] = 1; for(n=2,vecsize, v020639[n] = vecmin(factor(n)[, 1]));
    A020639(n) = v020639[n];
    A250477(n) = { my(p=prime(n),q=prime(n+1),u=p*q,k=1,s=1); while(k <= u, if(A020639(k) >= p, s++); k++); s; };
    for(n=1, 564, write("b250477.txt", n, " ", A250477(n)));
    \\ Antti Karttunen, Mar 29 2015

Formula

a(n) = A078898(A251720(n)).
a(1) = 1, a(n) = Sum_{d | A002110(n-1)} moebius(d) * floor(A006094(n) / d). [Follows when A251720, (p_n)^2 * p_{n+1} is substituted to the similar formula given for A078898. Here p_n is the n-th prime (A000040(n)), A006094(n) gives the product p_n * p{n+1} and A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could use here also Liouville's lambda (A008836) instead of Moebius mu (A008683)].
a(n) = A250474(n) + A256447(n).

A115561 a(n) = lpf((n/lpf(n))/lpf(n/lpf(n))), where lpf=A020639, least prime factor.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 5, 1, 1, 1, 2, 1, 1, 3, 7, 1, 5, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 7, 1, 11, 5, 1, 1, 2, 1, 5, 1, 13, 1, 3, 1, 2, 1, 1, 1, 3, 1, 1, 7, 2, 1, 11, 1, 17, 1, 7, 1, 2, 1, 1, 5, 19, 1, 13, 1, 2, 3, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 23, 1, 1, 1, 2, 1, 7, 11, 5, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 10 2006

Keywords

Comments

From Peter Munn, Jul 14 2019: (Start)
a(n) = 1 if and only if n is 1 or a prime or semiprime. Otherwise a(n) is the 3rd factor when n is written as a product of primes in nondecreasing order. For example, 60 = 2*2*3*5, so a(60) = 3.
Although values equal to 1 are predominant at low indices, their asymptotic density is 0, whereas for values equal to prime(k) for k > 0 the asymptotic density is positive, namely A281890(k,3)/A002110(k)^3. For all sufficiently large n the median value of a(1), a(2), ... a(n) is A281889(3) = 433.
(End)

Crossrefs

Programs

  • Mathematica
    f[n_] := FactorInteger[n][[1, 1]]; Table[f[#/f@ #] &[n/f@ n], {n, 101}] (* Michael De Vlieger, Aug 14 2017 *)
  • PARI
    a020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1) \\ after M. F. Hasler in A020639
    a(n) = a020639((n/a020639(n))/a020639(n/a020639(n))) \\ Felix Fröhlich, Jul 15 2019
  • Python
    from sympy import divisors, primefactors
    def a032752(n): return 1 if n==1 else divisors(n)[-2]
    def a020639(n): return 1 if n==1 else primefactors(n)[0]
    def a(n): return a020639(a032752(a032752(n)))
    print([a(n) for n in range(1, 102)]) # Indranil Ghosh, Aug 12 2017
    

Formula

a(n) = A020639(A054576(n)).
If A001222(n) >= 3, a(n) = A027746(n,3), otherwise a(n) = 1. - Peter Munn, Jul 13 2019

A281891 Square array A(n,k): number of integers having k or more factors less than prime(n+1) in their prime factorization, within any interval of primorial(n)^k positive integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 14, 22, 1, 0, 1, 46, 412, 162, 1, 0, 1, 146, 7072, 22164, 1830, 1, 0, 1, 454, 115432, 2744088, 2822340, 24270, 1, 0, 1, 1394, 1827592, 319881696, 3913037880, 496348740, 418350, 1, 0, 1, 4246, 28390552, 35924741232, 5079363328560, 9082206410040, 147569907780, 8040810, 1
Offset: 0

Views

Author

Peter Munn, Feb 08 2017

Keywords

Comments

Square array read by descending antidiagonals; A(n,k) with rows n >= 0, columns k >= 0. Prime factors are counted with multiplicity. Primorial(n) = A002110(n): product of first n primes.
Visualize the prime factorizations of the positive integers as a table with row headings giving each successive integer, and the primes of which the row heading is the product listed across the columns in nondecreasing order, repeated when necessary. Except for 1, which lacks prime factors, column 1 has the row heading's least prime factor, column 2 has a value for composite numbers but is blank for primes, and so on. This sequence measures precisely how frequently values up to and including the various primes occur in each column. This is possible because any given prime occurs cyclically in any given column, for the reason following.
The occurrence pattern of up to k factors of prime(n) in such prime factorizations has a fundamental period over the positive integers of prime(n)^k. The least common period for up to k factors of each of the first n primes is primorial(n)^k, and this covers everything that can affect the occurrence of prime(n) in the least k factors. Thus prime(n) is k-th least prime factor of integer m if and only if it is k-th least prime factor of m + primorial(n)^k.
Intermediate values in the calculation of this sequence appear in A281890.
If n > 0, A(n,1) = A053144(n) in accordance with the comment on A053144 dated Apr 08 2010.
A(2,k) = A027649(k) = 2*(3^k) - 2^k.

Examples

			The table starts:
   1     0         0             0             0           0        0 ...
   1     1         1             1             1           1        1 ...
   1     4        14            46           146         454     1394 ...
   1    22       412          7072        115432     1827592 28390552 ...
   1   162     22164       2744088     319881696 35924741232    ...
   1  1830   2822340    3913037880 5079363328560      ...
   1 24270 496348740 9082206410040       ...
   ...
Primes less than prime(2+1)=5 occur as second least factor 14 times in the prime factorizations of every interval of 36 = primorial(2)^2 positive integers (cf. A014673). Therefore, A(2,2) = 14.
		

Crossrefs

A079474 re-read as a square array gives values of primorial(n)^k = A002110(n)^k.
The values in the body of the factorization table described in the author's comments are in the irregular array A027746.
A096294 gives the equivalent array for integers expressed as a product of prime powers.

Formula

A(n,0) = 1 for n >= 0, A(0,k) = 0 for k >= 1.
A(n,k) = prime(n)^k * A(n-1,k) + A281890(n,k) for n >= 1, k >= 1.

Extensions

Edited by M. F. Hasler, Apr 14 2017

A309366 When the positive integers are written as products of primes in nondecreasing order, a(n) is the least prime to occur more frequently in n-th position than in any other position.

Original entry on oeis.org

2, 5, 71, 43103
Offset: 1

Views

Author

Peter Munn, Jul 25 2019

Keywords

Comments

In such products of primes, prime(m) occurs in n-th position A281890(m,n) times in every interval of A002110(m)^n positive integers, as explained in A281890. A002110(m) = primorial(m), product of first m primes.
For n >= 2, a(n) is the least prime to occur more frequently in n-th position than (n-1)-th position.
Primes p satisfying a(n) <= p < a(n+1) appear to occur more frequently in n-th position than in any other position.
The next term, a(5), is estimated to be ~ 6*10^11.

Examples

			a(1) = prime(1) = 2, since 2 occurs in n-th position when an integer divisible by 2^n is written as a product of primes in nondecreasing order, thus more frequently in 1st position than in other positions.
Prime(2) = 3 occurs more often in 1st position than 2nd position, specifically once for every 6 consecutive integers (since A281890(2,1) = 1 and primorial(2) = 6) compared with 5 times for every 36 consecutive integers (since A281890(2,2) = 5 and primorial(2)^2 = 36). As 2 and 3 each occur more frequently in 1st position than 2nd position, a(2) > 3.
Prime(3) = 5 occurs in 1st position A281890(3,1) = 2 times in primorial(3) = 30, in 2nd position A281890(3,2) = 62 times in 30^2, in 3rd position A281890(3,3) = 1322 times in 30^3, and decreasingly frequently in subsequent positions. 2/30 < 62/30^2 and 62/30^2 > 1322/30^3. Thus 5 occurs most frequently in 2nd position and is the first prime to do so, so a(2) = 5.
		

Crossrefs

Formula

a(1) = prime(1) = 2.
For n >= 2, a(n) = min{ k : k = prime(m), A281890(m,n) > A002110(m) * A281890(m,n-1) }.

A181930 Triangle T(d,k), where T(d,k)/lcm(1..d) gives the probability that d is the k-th divisor of an integer.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 4, 4, 3, 1, 0, 0, 0, 4, 5, 1, 0, 16, 20, 12, 6, 5, 1, 0, 0, 0, 48, 20, 26, 10, 1, 0, 0, 96, 40, 52, 44, 36, 11, 1, 0, 0, 0, 72, 48, 66, 34, 22, 9, 1, 0, 576, 720, 392, 384, 188, 154, 70, 26, 9, 1, 0, 0, 0, 0, 0, 480, 848, 560
Offset: 1

Views

Author

David W. Wilson, Apr 02 2012

Keywords

Comments

By probability is meant limit density on [1,n] as n grows without bound.
Equivalently, T(d,k) is lcm(1..d) times the asymptotic density of the numbers whose k-th divisor is d.

Examples

			T(5,4) = 3. T(5,4)/lcm(1..5) = 3/60 = 1/20 is the probability that 5 is the 4th divisor of an integer.
Triangle begins:
  (1),
  (0,1),
  (0,1,1),
  (0,0,2,1),
  (0,4,4,3,1),
  ...
		

Crossrefs

Formula

T(d,d) = 1.
T(d,k) = 0 if k < tau(d) = A000005(d). (If d is a divisor of m, then every divisor of d is a divisor of m, and d is therefore at least the tau(d)-th divisor of m.)
T(d,k) > 0 for k with tau(d) <= k <= d. [Appears to have been submitted on basis of a faulty proof. - Peter Munn, May 22 2025]
Sum_{d>=k} T(d,k)/lcm(1..d) = 1.
Sum_{k=1..d} T(d,k)/lcm(1..d) = 1/d.
T(d,tau(d)) = (lcm(1..d)/d) * Product_{q prime and there is an a with q^a < d and q^a does not divide d} (q-1)/q. In particular, if p is prime, then T(p,2) = (lcm(1..p)/p) * Product_{q prime and q < d} (q-1)/q. - Benoit Jubin, Apr 02 2012

Extensions

Edited by Peter Munn, May 22 2025
Showing 1-8 of 8 results.