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-10 of 80 results. Next

A252370 a(n) = A243055(A251726(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A243055(A251726(n)).
a(n) = A243055(A066048(A251726(n))). [Result depends only on the smallest and the largest prime factor of A251726(n).]

A252371 a(n) = A243055(A251727(n)).

Original entry on oeis.org

2, 3, 2, 4, 5, 3, 2, 3, 6, 7, 4, 2, 3, 4, 8, 2, 5, 5, 3, 6, 9, 2, 10, 4, 6, 7, 3, 11, 7, 5, 2, 12, 3, 13, 8, 4, 2, 8, 9, 14, 3, 3, 2, 6, 5, 15, 4, 10, 3, 7, 9, 4, 16, 2, 17, 11, 10, 3, 12, 5, 4, 18, 6, 8, 3, 13, 19, 7, 20, 11, 2, 7, 5, 4, 8, 5, 21, 14, 2, 12, 3, 22, 3, 6, 6, 13, 9, 4, 15, 23, 2, 5, 16, 8, 9, 10, 14, 7, 24, 4, 3, 4, 2, 17, 25, 6, 10, 26, 7, 5, 3
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A243055(A251727(n)).
a(n) = A243055(A066048(A251727(n))). [Result depends only on the smallest and the largest prime factor of A251727(n).]

A350069 Semiprimes k such that 1+(2^(1+A243055(k))) is a Fermat prime, where A243055(k) gives the difference between the indices of the smallest and the largest prime divisor of k.

Original entry on oeis.org

4, 6, 9, 14, 15, 25, 33, 35, 38, 49, 65, 69, 77, 106, 119, 121, 143, 145, 169, 177, 209, 217, 221, 289, 299, 305, 323, 361, 407, 437, 469, 493, 529, 533, 589, 667, 731, 781, 841, 851, 893, 899, 949, 961, 1147, 1189, 1219, 1333, 1343, 1369, 1517, 1577, 1681, 1711, 1739, 1763, 1849, 1891, 2021, 2047, 2173, 2209, 2479
Offset: 1

Views

Author

Antti Karttunen, Jan 29 2022

Keywords

Examples

			9 is a semiprime (9 = 3*3), and as the difference between the indices of the smallest (3) and the largest prime (3) dividing 9 is 0, we have 1+(2^(1+A243055(k))) = 3, which is in A019434, and therefore 9 is included in this sequence, like all squares of primes (A001248).
177 = 3 * 59 = prime(2) * prime(17), therefore A243055(177) = 17-2 = 15, and as 1+(2^16) = 65537 is also in A019434, 177 is included in this sequence.
		

Crossrefs

Positions of ones in A342651.
Subsequence of A001358. A001248 is a subsequence.

Programs

  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A243055(n) = if(1==n,0,my(f = factor(n), lpf = f[1, 1], gpf = f[#f~, 1]); (primepi(gpf)-primepi(lpf)));
    isA350069(n) = if(2!=bigomega(n),0,my(d=1+A243055(n)); (A209229(d) && isprime(1+(2^d))));

A061395 Let p be the largest prime factor of n; if p is the k-th prime then set a(n) = k; a(1) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 1, 2, 3, 5, 2, 6, 4, 3, 1, 7, 2, 8, 3, 4, 5, 9, 2, 3, 6, 2, 4, 10, 3, 11, 1, 5, 7, 4, 2, 12, 8, 6, 3, 13, 4, 14, 5, 3, 9, 15, 2, 4, 3, 7, 6, 16, 2, 5, 4, 8, 10, 17, 3, 18, 11, 4, 1, 6, 5, 19, 7, 9, 4, 20, 2, 21, 12, 3, 8, 5, 6, 22, 3, 2, 13, 23, 4, 7, 14, 10, 5, 24, 3, 6, 9, 11, 15
Offset: 1

Views

Author

Henry Bottomley, Apr 30 2001

Keywords

Comments

Records occur at the primes. - Robert G. Wilson v, Dec 30 2007
For n > 1: length of n-th row in A067255. - Reinhard Zumkeller, Jun 11 2013
a(n) = the largest part of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(20) = 3; indeed, the partition having Heinz number 20 = 2*2*5 is [1,1,3]. - Emeric Deutsch, Jun 04 2015

Examples

			a(20) = 3 since the largest prime factor of 20 is 5, which is the 3rd prime.
		

Crossrefs

Programs

  • Haskell
    a061395 = a049084 . a006530  -- Reinhard Zumkeller, Jun 11 2013
    
  • Maple
    with(numtheory):
    a:= n-> pi(max(1, factorset(n)[])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 03 2013
  • Mathematica
    Insert[Table[PrimePi[FactorInteger[n][[ -1]][[1]]], {n, 2, 120}], 0, 1] (* Stefan Steinerberger, Apr 11 2006 *)
    f[n_] := PrimePi[ FactorInteger@n][[ -1, 1]]; Array[f, 94] (* Robert G. Wilson v, Dec 30 2007 *)
  • PARI
    a(n) = if (n==1, 0, primepi(vecmax(factor(n)[,1]))); \\ Michel Marcus, Nov 14 2022
    
  • Python
    from sympy import primepi, primefactors
    def a(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 14 2017

Formula

A000040(a(n)) = A006530(n); a(n) = A049084(A006530(n)). - Reinhard Zumkeller, May 22 2003
A243055(n) = a(n) - A055396(n). - Antti Karttunen, Mar 07 2017
a(n) = A000720(A006530(n)). - Alois P. Heinz, Mar 05 2020
a(n) = A029837(A087207(n)+1). - Flávio V. Fernandes, Apr 24 2025

Extensions

Definition reworded by N. J. A. Sloane, Jul 01 2008

A055396 Smallest prime dividing n is a(n)-th prime (a(1)=0).

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 6, 1, 2, 1, 7, 1, 8, 1, 2, 1, 9, 1, 3, 1, 2, 1, 10, 1, 11, 1, 2, 1, 3, 1, 12, 1, 2, 1, 13, 1, 14, 1, 2, 1, 15, 1, 4, 1, 2, 1, 16, 1, 3, 1, 2, 1, 17, 1, 18, 1, 2, 1, 3, 1, 19, 1, 2, 1, 20, 1, 21, 1, 2, 1, 4, 1, 22, 1, 2, 1, 23, 1, 3, 1, 2, 1, 24, 1, 4, 1, 2, 1, 3, 1
Offset: 1

Views

Author

Henry Bottomley, May 15 2000

Keywords

Comments

Grundy numbers of the game in which you decrease n by a number prime to n, and the game ends when 1 is reached. - Eric M. Schmidt, Jul 21 2013
a(n) = the smallest part of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(21) = 2; indeed, the partition having Heinz number 21 = 3*7 is [2,4]. - Emeric Deutsch, Jun 04 2015
a(n) is the number of numbers whose largest proper divisor is n, i.e., for n>1, number of occurrences of n in A032742. - Stanislav Sykora, Nov 04 2016
For n > 1, a(n) gives the number of row where n occurs in arrays A083221 and A246278. - Antti Karttunen, Mar 07 2017

Examples

			a(15) = 2 because 15=3*5, 3<5 and 3 is the 2nd prime.
		

References

  • John H. Conway, On Numbers and Games, 2nd Edition, p. 129.

Crossrefs

Programs

  • Haskell
    a055396 = a049084 . a020639  -- Reinhard Zumkeller, Apr 05 2012
    
  • Maple
    with(numtheory):
    a:= n-> `if`(n=1, 0, pi(min(factorset(n)[]))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 03 2013
  • Mathematica
    a[1] = 0; a[n_] := PrimePi[ FactorInteger[n][[1, 1]] ]; Table[a[n], {n, 1, 96}](* Jean-François Alcover, Jun 11 2012 *)
  • PARI
    a(n)=if(n==1,0,primepi(factor(n)[1,1])) \\ Charles R Greathouse IV, Apr 23 2015
    
  • Python
    from sympy import primepi, isprime, primefactors
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a(n): return 0 if n==1 else a049084(min(primefactors(n))) # Indranil Ghosh, May 05 2017

Formula

From Reinhard Zumkeller, May 22 2003: (Start)
a(n) = A049084(A020639(n)).
A000040(a(n)) = A020639(n); a(n) <= A061395(n).
(End)
From Antti Karttunen, Mar 07 2017: (Start)
A243055(n) = A061395(n) - a(n).
a(A276086(n)) = A257993(n).
(End)

A048675 If n = p_i^e_i * ... * p_k^e_k, p_i < ... < p_k primes (with p_i = prime(i)), then a(n) = (1/2) * (e_i * 2^i + ... + e_k * 2^k).

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 4, 5, 16, 4, 32, 9, 6, 4, 64, 5, 128, 6, 10, 17, 256, 5, 8, 33, 6, 10, 512, 7, 1024, 5, 18, 65, 12, 6, 2048, 129, 34, 7, 4096, 11, 8192, 18, 8, 257, 16384, 6, 16, 9, 66, 34, 32768, 7, 20, 11, 130, 513, 65536, 8, 131072, 1025, 12, 6, 36, 19
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

The original motivation for this sequence was to encode the prime factorization of n in the binary representation of a(n), each such representation being unique as long as this map is restricted to A005117 (squarefree numbers, resulting a permutation of nonnegative integers A048672) or any of its subsequence, resulting an injective function like A048623 and A048639.
However, also the restriction to A260443 (not all terms of which are squarefree) results a permutation of nonnegative integers, namely A001477, the identity permutation.
When a polynomial with nonnegative integer coefficients is encoded with the prime factorization of n (e.g., as in A206296, A260443), then a(n) gives the evaluation of that polynomial at x=2.
The primitive completely additive integer sequence that satisfies a(n) = a(A225546(n)), n >= 1. By primitive, we mean that if b is another such sequence, then there is an integer k such that b(n) = k * a(n) for all n >= 1. - Peter Munn, Feb 03 2020
If the binary rank of an integer partition y is given by Sum_i 2^(y_i-1), and the Heinz number is Product_i prime(y_i), then a(n) is the binary rank of the integer partition with Heinz number n. Note the function taking a set s to Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices), and the function taking a multiset m to Product_i prime(m_i) is the inverse of A112798 (prime indices). - Gus Wiseman, May 22 2024

Examples

			From _Gus Wiseman_, May 22 2024: (Start)
The A018819(7) = 6 cases of binary rank 7 are the following, together with their prime indices:
   30: {1,2,3}
   40: {1,1,1,3}
   54: {1,2,2,2}
   72: {1,1,1,2,2}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
(End)
		

Crossrefs

Row 2 of A104244.
Similar logarithmic functions: A001414, A056239, A090880, A289506, A293447.
Left inverse of the following sequences: A000079, A019565, A038754, A068911, A134683, A260443, A332824.
A003961, A028234, A032742, A055396, A064989, A067029, A225546, A297845 are used to express relationship between terms of this sequence.
Cf. also A048623, A048676, A099884, A277896 and tables A277905, A285325.
Cf. A297108 (Möbius transform), A332813 and A332823 [= a(n) mod 3].
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000203,A331750), (A005940,A087808), (A007913,A248663), (A007947,A087207), (A097248,A048675), (A206296,A000129), (A248692,A056239), (A283477,A005187), (A284003,A006068), (A285101,A028362), (A285102,A068052), (A293214,A001065), (A318834,A051953), (A319991,A293897), (A319992,A293898), (A320017,A318674), (A329352,A069359), (A332461,A156552), (A332462,A156552), (A332825,A000010) and apparently (A163511,A135529).
See comments/formulas in A277333, A331591, A331740 giving their relationship to this sequence.
The formula section details how the sequence maps the terms of A329050, A329332.
A277892, A322812, A322869, A324573, A324575 give properties of the n-th term of this sequence.
The term k appears A018819(k) times.
The inverse transformation is A019565 (Heinz number of binary indices).
The version for distinct prime indices is A087207.
Numbers k such that a(k) is prime are A277319, counts A372688.
Grouping by image gives A277905.
A014499 lists binary indices of prime numbers.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc. - this is also A049084.
    A048675 := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end;
    # simpler alternative
    f:= n -> add(2^(numtheory:-pi(t[1])-1)*t[2], t=ifactors(n)[2]):
    map(f, [$1..100]); # Robert Israel, Oct 10 2016
  • Mathematica
    a[1] = 0; a[n_] := Total[ #[[2]]*2^(PrimePi[#[[1]]]-1)& /@ FactorInteger[n] ]; Array[a, 100] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    a(n) = my(f = factor(n)); sum(k=1, #f~, f[k,2]*2^primepi(f[k,1]))/2; \\ Michel Marcus, Oct 10 2016
    
  • PARI
    \\ The following program reconstructs terms (e.g. for checking purposes) from the factorization file prepared by Hans Havermann:
    v048675sigs = readvec("a048675.txt");
    A048675(n) = if(n<=2,n-1,my(prsig=v048675sigs[n],ps=prsig[1],es=prsig[2]); prod(i=1,#ps,ps[i]^es[i])); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        if n==1: return 0
        f=factorint(n)
        return sum([f[i]*2**(primepi(i) - 1) for i in f])
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 19 2017

Formula

a(1) = 0, a(n) = 1/2 * (e1*2^i1 + e2*2^i2 + ... + ez*2^iz) if n = p_{i1}^e1*p_{i2}^e2*...*p_{iz}^ez, where p_i is the i-th prime. (e.g. p_1 = 2, p_2 = 3).
Totally additive with a(p^e) = e * 2^(PrimePi(p)-1), where PrimePi(n) = A000720(n). [Missing factor e added to the comment by Antti Karttunen, Jul 29 2015]
From Antti Karttunen, Jul 29 2015: (Start)
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A032742(n)). [Where A055396(n) gives the index of the smallest prime dividing n and A032742(n) gives the largest proper divisor of n.]
a(1) = 0; for n > 1, a(n) = (A067029(n) * (2^(A055396(n)-1))) + a(A028234(n)).
Other identities. For all n >= 0:
a(A019565(n)) = n.
a(A260443(n)) = n.
a(A206296(n)) = A000129(n).
a(A005940(n+1)) = A087808(n).
a(A007913(n)) = A248663(n).
a(A007947(n)) = A087207(n).
a(A283477(n)) = A005187(n).
a(A284003(n)) = A006068(n).
a(A285101(n)) = A028362(1+n).
a(A285102(n)) = A068052(n).
Also, it seems that a(A163511(n)) = A135529(n) for n >= 1. (End)
a(1) = 0, a(2n) = 1+a(n), a(2n+1) = 2*a(A064989(2n+1)). - Antti Karttunen, Oct 11 2016
From Peter Munn, Jan 31 2020: (Start)
a(n^2) = a(A003961(n)) = 2 * a(n).
a(A297845(n,k)) = a(n) * a(k).
a(n) = a(A225546(n)).
a(A329332(n,k)) = n * k.
a(A329050(n,k)) = 2^(n+k).
(End)
From Antti Karttunen, Feb 02-25 2020, Feb 01 2021: (Start)
a(n) = Sum_{d|n} A297108(d) = Sum_{d|A225546(n)} A297108(d).
a(n) = a(A097248(n)).
For n >= 2:
A001221(a(n)) = A322812(n), A001222(a(n)) = A277892(n).
A000203(a(n)) = A324573(n), A033879(a(n)) = A324575(n).
For n >= 1, A331750(n) = a(A000203(n)).
For n >= 1, the following chains hold:
A293447(n) >= a(n) >= A331740(n) >= A331591(n).
a(n) >= A087207(n) >= A248663(n).
(End)
a(n) = A087207(A097248(n)). - Flávio V. Fernandes, Jul 16 2025

Extensions

Entry revised by Antti Karttunen, Jul 29 2015
More linking formulas added by Antti Karttunen, Apr 18 2017

A108951 Primorial inflation of n: Fully multiplicative with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

1, 2, 6, 4, 30, 12, 210, 8, 36, 60, 2310, 24, 30030, 420, 180, 16, 510510, 72, 9699690, 120, 1260, 4620, 223092870, 48, 900, 60060, 216, 840, 6469693230, 360, 200560490130, 32, 13860, 1021020, 6300, 144, 7420738134810, 19399380, 180180, 240, 304250263527210, 2520
Offset: 1

Views

Author

Paul Boddington, Jul 21 2005

Keywords

Comments

This sequence is a permutation of A025487.
And thus also a permutation of A181812, see the formula section. - Antti Karttunen, Jul 21 2014
A previous description of this sequence was: "Multiplicative with a(p^e) equal to the product of the e-th powers of all primes at most p" (see extensions), Giuseppe Coppoletta, Feb 28 2015

Examples

			a(12) = a(2^2) * a(3) = (2#)^2 * (3#) = 2^2 * 6 = 24
a(45) = (3#)^2 * (5#) = (2*3)^2 * (2*3*5) = 1080 (as 45 = 3^2 * 5).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{f = FactorInteger[n], p, e}, If[Length[f]>1, Times @@ a /@ Power @@@ f, {{p, e}} = f; Times @@ (Prime[Range[PrimePi[p]]]^e)]]; a[1] = 1; Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Feb 24 2015 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}], {n, 42}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    primorial(n)=prod(i=1,primepi(n),prime(i))
    a(n)=my(f=factor(n)); prod(i=1,#f~, primorial(f[i,1])^f[i,2]) \\ Charles R Greathouse IV, Jun 28 2015
    
  • Python
    from sympy import primerange, factorint
    from operator import mul
    def P(n): return reduce(mul, [i for i in primerange(2, n + 1)])
    def a(n):
        f = factorint(n)
        return 1 if n==1 else reduce(mul, [P(i)**f[i] for i in f])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 14 2017
  • Sage
    def sharp_primorial(n): return sloane.A002110(prime_pi(n))
    def p(f):
        return sharp_primorial(f[0])^f[1]
    [prod(p(f) for f in factor(n)) for n in range (1,51)]
    # Giuseppe Coppoletta, Feb 07 2015
    

Formula

Dirichlet g.f.: 1/(1-2*2^(-s))/(1-6*3^(-s))/(1-30*5^(-s))...
Completely multiplicative with a(p_i) = A002110(i) = prime(i)#. [Franklin T. Adams-Watters, Jun 24 2009; typos corrected by Antti Karttunen, Jul 21 2014]
From Antti Karttunen, Jul 21 2014: (Start)
a(1) = 1, and for n > 1, a(n) = n * a(A064989(n)).
a(n) = n * A181811(n).
a(n) = A002110(A061395(n)) * A331188(n). - [added Jan 14 2020]
a(n) = A181812(A048673(n)).
Other identities:
A006530(a(n)) = A006530(n). [Preserves the largest prime factor of n.]
A071178(a(n)) = A071178(n). [And also its exponent.]
a(2^n) = 2^n. [Fixes the powers of two.]
A067029(a(n)) = A007814(a(n)) = A001222(n). [The exponent of the least prime of a(n), that prime always being 2 for n>1, is equal to the total number of prime factors in n.]
(End)
From Antti Karttunen, Nov 19 2019: (Start)
Further identities:
a(A307035(n)) = A000142(n).
a(A003418(n)) = A181814(n).
a(A025487(n)) = A181817(n).
a(A181820(n)) = A181822(n).
a(A019565(n)) = A283477(n).
A001221(a(n)) = A061395(n).
A001222(a(n)) = A056239(n).
A181819(a(n)) = A122111(n).
A124859(a(n)) = A181821(n).
A085082(a(n)) = A238690(n).
A328400(a(n)) = A329600(n). (smallest number with the same set of distinct prime exponents)
A000188(a(n)) = A329602(n). (square root of the greatest square divisor)
A072411(a(n)) = A329378(n). (LCM of exponents of prime factors)
A005361(a(n)) = A329382(n). (product of exponents of prime factors)
A290107(a(n)) = A329617(n). (product of distinct exponents of prime factors)
A000005(a(n)) = A329605(n). (number of divisors)
A071187(a(n)) = A329614(n). (smallest prime factor of number of divisors)
A267115(a(n)) = A329615(n). (bitwise-AND of exponents of prime factors)
A267116(a(n)) = A329616(n). (bitwise-OR of exponents of prime factors)
A268387(a(n)) = A329647(n). (bitwise-XOR of exponents of prime factors)
A276086(a(n)) = A324886(n). (prime product form of primorial base expansion)
A324580(a(n)) = A324887(n).
A276150(a(n)) = A324888(n). (digit sum in primorial base)
A267263(a(n)) = A329040(n). (number of distinct nonzero digits in primorial base)
A243055(a(n)) = A329343(n).
A276088(a(n)) = A329348(n). (least significant nonzero digit in primorial base)
A276153(a(n)) = A329349(n). (most significant nonzero digit in primorial base)
A328114(a(n)) = A329344(n). (maximal digit in primorial base)
A062977(a(n)) = A325226(n).
A097248(a(n)) = A283478(n).
A324895(a(n)) = A324896(n).
A324655(a(n)) = A329046(n).
A327860(a(n)) = A329047(n).
A329601(a(n)) = A329607(n).
(End)
a(A181815(n)) = A025487(n), and A319626(a(n)) = A329900(a(n)) = n. - Antti Karttunen, Dec 29 2019
From Antti Karttunen, Jul 09 2021: (Start)
a(n) = A346092(n) + A346093(n).
a(n) = A346108(n) - A346109(n).
a(A342012(n)) = A004490(n).
a(A337478(n)) = A336389(n).
A336835(a(n)) = A337474(n).
A342002(a(n)) = A342920(n).
A328571(a(n)) = A346091(n).
A328572(a(n)) = A344592(n).
(End)
Sum_{n>=1} 1/a(n) = A161360. - Amiram Eldar, Aug 04 2022

Extensions

More terms computed by Antti Karttunen, Jul 21 2014
The name of the sequence was changed for more clarity, in accordance with the above remark of Franklin T. Adams-Watters (dated Jun 24 2009). It is implicitly understood that a(n) is then uniquely defined by completely multiplicative extension. - Giuseppe Coppoletta, Feb 28 2015
Name "Primorial inflation" (coined by Matthew Vandermast in A181815) prefixed to the name by Antti Karttunen, Jan 14 2020

A078898 Number of times the smallest prime factor of n is the smallest prime factor for numbers <= n; a(0)=0, a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

From Antti Karttunen, Dec 06 2014: (Start)
For n >= 2, a(n) tells in which column of the sieve of Eratosthenes (see A083140, A083221) n occurs in. A055396 gives the corresponding row index.
(End)

Crossrefs

Programs

  • Haskell
    import Data.IntMap (empty, findWithDefault, insert)
    a078898 n = a078898_list !! n
    a078898_list = 0 : 1 : f empty 2 where
       f m x = y : f (insert p y m) (x + 1) where
               y = findWithDefault 0 p m + 1
               p = a020639 x
    -- Reinhard Zumkeller, Apr 06 2015
  • Maple
    N:= 1000: # to get a(0) to a(N)
    Primes:= select(isprime, [2,seq(2*i+1,i=1..floor((N-1)/2))]):
    A:= Vector(N):
    for p in Primes do
      t:= 1:
      A[p]:= 1:
      for n from p^2 to N by p do
        if A[n] = 0 then
           t:= t+1:
           A[n]:= t
        fi
      od
    od:
    0,1,seq(A[i],i=2..N); # Robert Israel, Jan 04 2015
  • Mathematica
    Module[{nn=90,spfs},spfs=Table[FactorInteger[n][[1,1]],{n,nn}];Table[ Count[ Take[spfs,i],spfs[[i]]],{i,nn}]] (* Harvey P. Dale, Sep 01 2014 *)
  • PARI
    \\ Not practical for computing, but demonstrates the sum moebius formula:
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A055396(n) = { if(1==n,0,primepi(A020639(n))); };
    A002110(n) = prod(i=1, n, prime(i));
    A078898(n) = { my(k,p); if(1==n, n, k = A002110(A055396(n)-1); p = A020639(n); sumdiv(k, d, moebius(d)*(n\(p*d)))); };
    \\ Antti Karttunen, Dec 05 2014
    
  • Scheme
    ;; With memoizing definec-macro.
    (definec (A078898 n) (if (< n 2) n (+ 1 (A078898 (A249744 n)))))
    ;; Much better for computing. Needs also code from A249738 and A249744. - Antti Karttunen, Dec 06 2014
    

Formula

Ordinal transform of A020639 (Lpf). - Franklin T. Adams-Watters, Aug 28 2006
From Antti Karttunen, Dec 05-08 2014: (Start)
a(0) = 0, a(1) = 1, a(n) = 1 + a(A249744(n)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(n / (A020639(n)*d)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(A032742(n) / d).
[Instead of Moebius mu (A008683) one could use Liouville's lambda (A008836) in the above formulas, because all primorials (A002110) are squarefree. A020639(n) gives the smallest prime dividing n, and A055396 gives its index].
a(0) = 0, a(1) = 1, a(2n) = n, a(2n+1) = a(A250470(2n+1)). [After a similar recursive formula for A246277. However, this cannot be used for computing the sequence, unless a definition for A250470(n) is found which doesn't require computing the value of A078898(n).]
For n > 1: a(n) = A249810(n) - A249820(n).
(End)
Other identities:
a(2*n) = n.
For n > 1: a(n)=1 if and only if n is prime.
For n > 1: a(n) = A249808(n, A055396(n)) = A249809(n, A055396(n)).
For n > 1: a(n) = A246277(A249818(n)).
From Antti Karttunen, Jan 04 2015: (Start)
a(n) = 2 if and only if n is a square of a prime.
For all n >= 1: a(A251728(n)) = A243055(A251728(n)) + 2. That is, if n is a semiprime of the form prime(i)*prime(j), prime(i) <= prime(j) < prime(i)^2, then a(n) = (j-i)+2.
(End)
a(A000040(n)^2) = 2; a(A000040(n)*A000040(n+1)) = 3. - Reinhard Zumkeller, Apr 06 2015
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Oct 26 2024

Extensions

a(0) = 0 prepended for recurrence's sake by Antti Karttunen, Dec 06 2014

A246277 Column index of n in A246278: a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

If n >= 2, n occurs in column a(n) of A246278.
By convention, a(1) = 0 because 1 does not occur in A246278.

Crossrefs

Terms of A348717 halved. A305897 is the restricted growth sequence transform.
Positions of terms 1 .. 8 in this sequence are given by the following sequences: A000040, A001248, A006094, A030078, A090076, A251720, A090090, A030514.
Cf. A078898 (has the same role with array A083221 as this sequence has with A246278).
This sequence is also used in the definition of the following permutations: A246274, A246276, A246675, A246677, A246683, A249815, A249817 (A249818), A249823, A249825, A250244, A250245, A250247, A250249.
Also in the definition of arrays A249821, A251721, A251722.
Sum of prime indices of a(n) is A359358(n) + A001222(n) - 1, cf. A326844.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Mathematica
    a246277[n_Integer] := Module[{f, p, a064989, a},
      f[x_] := Transpose@FactorInteger[x];
      p[x_] := Which[
        x == 1, 1,
        x == 2, 1,
        True, NextPrime[x, -1]];
      a064989[x_] := Times @@ Power[p /@ First[f[x]], Last[f[x]]];
      a[1] = 0;
      a[x_] := If[EvenQ[x], x/2, NestWhile[a064989, x, OddQ]/2];
    a/@Range[n]]; a246277[84] (* Michael De Vlieger, Dec 19 2014 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
    
  • PARI
    A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1,1])-1); for (i=1, #f~, f[i,1] = prime(primepi(f[i,1])-k)); factorback(f)/2); \\ Antti Karttunen, Apr 30 2022
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a(n): return 0 if n==1 else n//2 if n%2==0 else a(a064989(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
  • Scheme
    ;; two different variants, the second one employing memoizing definec-macro)
    (define (A246277 n) (if (= 1 n) 0 (let loop ((n n)) (if (even? n) (/ n 2) (loop (A064989 n))))))
    (definec (A246277 n) (cond ((= 1 n) 0) ((even? n) (/ n 2)) (else (A246277 (A064989 n)))))
    

Formula

a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)) = a(A064216(n+1)). [Cf. the formula for A252463.]
Instead of the equation for a(2n+1) above, we may write a(A003961(n)) = a(n). - Peter Munn, May 21 2022
Other identities. For all n >= 1, the following holds:
For all w >= 0, a(p_{i} * p_{j} * ... * p_{k}) = a(p_{i+w} * p_{j+w} * ... * p_{k+w}).
For all n >= 2, A001222(a(n)) = A001222(n)-1. [a(n) has one less prime factor than n. Thus each semiprime (A001358) is mapped to some prime (A000040), etc.]
For all n >= 2, a(n) = A078898(A249817(n)).
For semiprimes n = p_i * p_j, j >= i, a(n) = A000040(1+A243055(n)) = p_{1+j-i}.
a(n) = floor(A348717(n)/2). - Antti Karttunen, Apr 30 2022
If n has prime factorization Product_{i=1..k} prime(x_i), then a(n) = Product_{i=2..k} prime(x_i-x_1+1). The opposite version is A358195, prime indices A358172, even bisection A241916. - Gus Wiseman, Dec 29 2022

A348717 a(n) is the least k such that A003961^i(k) = n for some i >= 0 (where A003961^i denotes the i-th iterate of A003961).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 12, 2, 14, 6, 16, 2, 18, 2, 20, 10, 22, 2, 24, 4, 26, 8, 28, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 40, 2, 42, 2, 44, 12, 46, 2, 48, 4, 50, 26, 52, 2, 54, 10, 56, 34, 58, 2, 60, 2, 62, 20, 64, 14, 66, 2, 68, 38, 70, 2, 72, 2
Offset: 1

Views

Author

Rémy Sigrist, Oct 31 2021

Keywords

Comments

All terms except a(1) = 1 are even.
To compute a(n) for n > 1:
- if n = Product_{j = 1..o} prime(p_j)^e_j (where prime(i) denotes the i-th prime number, p_1 < ... < p_o and e_1 > 0)
- then a(n) = Product_{j = 1..o} prime(p_j + 1 - p_1)^e_j.
This sequence has similarities with A304776: here we shift down prime indexes, there prime exponents.
Smallest number generated by uniformly decrementing the indices of the prime factors of n. Thus, for n > 1, the smallest m > 1 such that the first differences of the indices of the ordered prime factors (including repetitions) are the same for m and n. As a function, a(.) preserves properties such as prime signature. - Peter Munn, May 12 2022

Crossrefs

Positions of particular values (see formula section): A000040, A001248, A006094, A030078, A030514, A046301, A050997, A090076, A090090, A166329, A251720.
Also see formula section for the relationship to: A000265, A003961, A004277, A005940, A020639, A046523, A055396, A071364, A122111, A156552, A243055, A243074, A297845, A322993.
Sequences with comparable definitions: A304776, A316437.
Cf. A246277 (terms halved), A305897 (restricted growth sequence transform), A354185 (Möbius transform), A354186 (Dirichlet inverse), A354187 (sum with it).

Programs

  • Mathematica
    a[1] = 1; a[n_] := Module[{f = FactorInteger[n], d}, d = PrimePi[f[[1, 1]]] - 1; Times @@ ((Prime[PrimePi[#[[1]]] - d]^#[[2]]) & /@ f)]; Array[a, 100] (* Amiram Eldar, Oct 31 2021 *)
  • PARI
    a(n) = { my (f=factor(n)); if (#f~>0, my (pi1=primepi(f[1,1])); for (k=1, #f~, f[k,1] = prime(primepi(f[k,1])-pi1+1))); factorback(f) }

Formula

a(n) = n iff n belongs to A004277.
A003961^(A055396(n)-1)(a(n)) = n for any n > 1.
a(n) = 2 iff n belongs to A000040 (prime numbers).
a(n) = 4 iff n belongs to A001248 (squares of prime numbers).
a(n) = 6 iff n belongs to A006094 (products of two successive prime numbers).
a(n) = 8 iff n belongs to A030078 (cubes of prime numbers).
a(n) = 10 iff n belongs to A090076.
a(n) = 12 iff n belongs to A251720.
a(n) = 14 iff n belongs to A090090.
a(n) = 16 iff n belongs to A030514.
a(n) = 30 iff n belongs to A046301.
a(n) = 32 iff n belongs to A050997.
a(n) = 36 iff n belongs to A166329.
a(1) = 1, for n > 1, a(n) = 2*A246277(n). - Antti Karttunen, Feb 23 2022
a(n) = A122111(A243074(A122111(n))). - Peter Munn, Feb 23 2022
From Peter Munn and Antti Karttunen, May 12 2022: (Start)
a(1) = 1; a(2n) = 2n; a(A003961(n)) = a(n). [complete definition]
a(n) = A005940(1+A322993(n)) = A005940(1+A000265(A156552(n))).
Equivalently, A156552(a(n)) = A000265(A156552(n)).
A297845(a(n), A020639(n)) = n.
A046523(a(n)) = A046523(n).
A071364(a(n)) = A071364(n).
a(n) >= A071364(n).
A243055(a(n)) = A243055(n).
(End)
Showing 1-10 of 80 results. Next