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 11 results. Next

A373985 a(n) = gcd(A108951(n), A373158(n)), where A108951 is fully multiplicative and A373158 is fully additive with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

1, 2, 6, 4, 30, 4, 210, 2, 12, 4, 2310, 2, 30030, 4, 36, 8, 510510, 2, 9699690, 2, 36, 4, 223092870, 12, 60, 4, 18, 2, 6469693230, 2, 200560490130, 2, 12, 4, 60, 16, 7420738134810, 4, 12, 12, 304250263527210, 2, 13082761331670030, 2, 6, 4, 614889782588491410, 2, 420, 2, 36, 2, 32589158477190044730, 4, 180, 24, 36, 4
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2024

Keywords

Crossrefs

Programs

  • PARI
    A373985(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); gcd(m,s); };

Formula

a(n) = gcd(A373158(n), A373984(n)).
a(n) = A108951(n) / A373987(n).
For n >= 2, a(n) = A373158(n) / A373986(n).
For n >= 1, a(A000040(n)) = A002110(n).

A373986 Numerator of A373158(n) / A108951(n), where A108951 is fully multiplicative and A373158 is fully additive with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 3, 1, 8, 1, 5, 1, 53, 1, 1, 1, 7, 1, 17, 6, 578, 1, 1, 1, 7508, 1, 107, 1, 19, 1, 5, 193, 127628, 4, 1, 1, 2424923, 2503, 3, 1, 109, 1, 1157, 7, 55773218, 1, 7, 1, 31, 14181, 15017, 1, 5, 13, 9, 269436, 1617423308, 1, 1, 1, 50140122533, 37, 3, 167, 1159, 1, 255257, 18591073, 121, 1, 1, 1, 1855184533703
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2024

Keywords

Crossrefs

Cf. A108951, A373158, A373985, A373987 (denominators), A373988 (rgs-transform).

Programs

  • PARI
    A373986(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); s/gcd(m,s); };
    
  • PARI
    A373986(n) = numerator(A373158(n)/A108951(n));

Formula

a(n) = A373158(n) / A373985(n) = A373158(n) / gcd(A108951(n), A373158(n)).

A373987 Denominator of A373158(n) / A108951(n), where A108951 is fully multiplicative and A373158 is fully additive with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 4, 3, 15, 1, 12, 1, 105, 5, 2, 1, 36, 1, 60, 35, 1155, 1, 4, 15, 15015, 12, 420, 1, 180, 1, 16, 1155, 255255, 105, 9, 1, 4849845, 15015, 20, 1, 1260, 1, 4620, 180, 111546435, 1, 48, 105, 900, 85085, 60060, 1, 108, 385, 70, 1616615, 3234846615, 1, 18, 1, 100280245065, 1260, 16, 5005, 13860, 1, 1021020
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2024

Keywords

Crossrefs

Cf. A108951, A373158, A373985, A373986 (numerators).

Programs

  • PARI
    A373987(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); m/gcd(m,s); };
    
  • PARI
    A373987(n) = denominator(A373158(n)/A108951(n));

Formula

a(n) = A108951(n) / A373985(n) = A108951(n) / gcd(A108951(n), A373158(n)).

A373984 a(n) = A108951(n) - A373158(n), where A108951 is fully multiplicative and A373158 is fully additive with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

1, 0, 0, 0, 0, 4, 0, 2, 24, 28, 0, 14, 0, 208, 144, 8, 0, 58, 0, 86, 1044, 2308, 0, 36, 840, 30028, 198, 626, 0, 322, 0, 22, 11544, 510508, 6060, 128, 0, 9699688, 150144, 204, 0, 2302, 0, 6926, 1038, 223092868, 0, 82, 43680, 1738, 2552544, 90086, 0, 412, 66960, 1464, 48498444, 6469693228, 0, 680, 0, 200560490128
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2024

Keywords

Crossrefs

Programs

  • PARI
    A373984(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); (m-s); };

A373989 a(n) = A276150(gcd(A108951(n), A373158(n))), where A276150 is the digit sum in primorial base, A108951 is fully multiplicative and A373158 is fully additive with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 26 2024

Keywords

Crossrefs

Programs

  • PARI
    A276150(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += d; n = (n-d)/p; p = nextprime(1+p)); (s); };
    A373985(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); gcd(m,s); };
    A373989(n) = A276150(A373985(n));

Formula

a(n) = A276150(A373985(n)).

A001414 Integer log of n: sum of primes dividing n (with repetition). Also called sopfr(n).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, 8, 17, 8, 19, 9, 10, 13, 23, 9, 10, 15, 9, 11, 29, 10, 31, 10, 14, 19, 12, 10, 37, 21, 16, 11, 41, 12, 43, 15, 11, 25, 47, 11, 14, 12, 20, 17, 53, 11, 16, 13, 22, 31, 59, 12, 61, 33, 13, 12, 18, 16, 67, 21, 26, 14, 71, 12, 73, 39, 13, 23, 18, 18
Offset: 1

Views

Author

Keywords

Comments

MacMahon calls this the potency of n.
Downgrades the operators in a prime decomposition. E.g., 40 factors as 2^3 * 5 and sopfr(40) = 2 * 3 + 5 = 11.
Consider all ways of writing n as a product of zero, one, or more factors; sequence gives smallest sum of terms. - Amarnath Murthy, Jul 07 2001
a(n) <= n for all n, and a(n) = n iff n is 4 or a prime.
Look at the graph of this sequence. At the lower edge of the logarithmic scatterplot there is a set of fuzzy but unmistakable diagonal fringes, sloping toward the southeast. Their spacing gradually increases, and their slopes gradually decrease; they are more distinct toward the lower edge of the range. Is any explanation known? - Allan C. Wechsler, Oct 11 2015
For n >= 2, the glb and lub are: 3 * log(n) / log(3) <= a(n) <= n, where the lub occurs when n = 3^k, k >= 1. (Jakimczuk 2012) - Daniel Forgues, Oct 12 2015
Except for the initial term, row sums of A027746. - M. F. Hasler, Feb 08 2016
Atanassov proves that a(n) <= A065387(n) - n. - Charles R Greathouse IV, Dec 06 2016
From Robert G. Wilson v, Aug 15 2022: (Start)
Differs from A337310 beginning with n at 64, 192, 256, 320, 448, 512, ..., .
The number of terms which equal k is A000607(k).
The first occurrence of k>1 is A056240(k).
The last occurrence of k>1 is A000792(k).
The Amarnath Murthy comment of Jul 07 2001 is a result of the fundamental theorem of arithmetic.
(End)

Examples

			a(24) = 2+2+2+3 = 9.
a(30) = 10: 30 can be written as 30, 15*2, 10*3, 6*5, 5*3*2. The corresponding sums are 30, 17, 13, 11, 10. Among these 10 is the least.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Amarnath Murthy, Generalization of Partition function and introducing Smarandache Factor Partition, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring-2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 89.
  • 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

A000607(n) gives the number of values of k for which A001414(k) = n.
Cf. A036349 (indices of even terms), A356163 (their char. function), A335657 (indices of odd terms), A289142 (of multiples of 3), A373371 (their char. function).
For sum of squares of prime factors see A067666, for cubes see A224787.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A056239 (with a(p)=primepi(p)), A059975 (with a(p)=p-1), A064097 (with a(p)=1+a(p-1)), A113177 (with a(p)=Fib(p)), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
For other completely additive sequences see the cross-references in A104244.

Programs

  • Haskell
    a001414 1 = 0
    a001414 n = sum $ a027746_row n
    -- Reinhard Zumkeller, Feb 27 2012, Nov 20 2011
    
  • Magma
    [n eq 1 select 0 else (&+[j[1]*j[2]: j in Factorization(n)]): n in [1..100]]; // G. C. Greubel, Jan 10 2019
  • Maple
    A001414 := proc(n) add( op(1,i)*op(2,i),i=ifactors(n)[2]) ; end proc:
    seq(A001414(n), n=1..100); # Peter Luschny, Jan 17 2011
  • Mathematica
    a[n_] := Plus @@ Times @@@ FactorInteger@ n; a[1] = 0; Array[a, 78] (* Ray Chandler, Nov 12 2005 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); sum(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    A001414(n) = (n=factor(n))[,1]~*n[,2] \\ M. F. Hasler, Feb 07 2009
    
  • Python
    from sympy import factorint
    def A001414(n):
        return sum(p*e for p,e in factorint(n).items()) # Chai Wah Wu, Jan 08 2016
    
  • Sage
    [sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0,len(factor(n)))) for n in range(1,79)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

If n = Product p_j^k_j then a(n) = Sum p_j * k_j.
Dirichlet g.f. f(s)*zeta(s), where f(s) = Sum_{p prime} p/(p^s-1) = Sum_{k>0} primezeta(k*s-1) is the Dirichlet g.f. for A120007. Totally additive with a(p^e) = p*e. - Franklin T. Adams-Watters, Jun 02 2006
For n > 1: a(n) = Sum_{k=1..A001222(n)} A027746(n,k). - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} (-1)^a(n)/n^s = ((2^s + 1)/(2^s - 1))*zeta(2*s)/zeta(s), if Re(s)>1 and 0 if s=1 (Alladi and Erdős, 1977). - Amiram Eldar, Nov 02 2020
a(n) >= k*log(n), where k = 3/log(3). This bound is sharp. - Charles R Greathouse IV, Jul 28 2025

A276085 Primorial base log-function: fully additive with a(p) = p#/p, where p# = A034386(p).

Original entry on oeis.org

0, 1, 2, 2, 6, 3, 30, 3, 4, 7, 210, 4, 2310, 31, 8, 4, 30030, 5, 510510, 8, 32, 211, 9699690, 5, 12, 2311, 6, 32, 223092870, 9, 6469693230, 5, 212, 30031, 36, 6, 200560490130, 510511, 2312, 9, 7420738134810, 33, 304250263527210, 212, 10, 9699691, 13082761331670030, 6, 60, 13, 30032, 2312, 614889782588491410, 7, 216, 33, 510512, 223092871, 32589158477190044730, 10
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2016

Keywords

Comments

Completely additive with a(p^e) = e * A002110(A000720(p)-1).
This is a left inverse of A276086 ("primorial base exp-function"), hence the name "primorial base log-function". When the domain is restricted to the terms of A048103, this works also as a right inverse, as A276086(a(A048103(n))) = A048103(n) for all n >= 1. - Antti Karttunen, Apr 24 2022
On average, every third term is a multiple of 4. See A369001. - Antti Karttunen, May 26 2024

Crossrefs

A left inverse of A276086.
Positions of multiples of k in this sequence, for k=2, 3, 4, 5, 8, 27, 3125: A003159, A339746, A369002, A373140, A373138, A377872, A377878.
Cf. A036554 (positions of odd terms), A035263, A096268 (parity of terms).
Cf. A372575 (rgs-transform), A372576 [a(n) mod 360], A373842 [= A003415(a(n))].
Cf. A373145 [= gcd(A003415(n), a(n))], A373361 [= gcd(n, a(n))], A373362 [= gcd(A001414(n), a(n))], A373485 [= gcd(A083345(n), a(n))], A373835 [= gcd(bigomega(n), a(n))], and also A373367 and A373147 [= A003415(n) mod a(n)], A373148 [= a(n) mod A003415(n)].
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A001414 (with a(p)=p), A059975 (with a(p)=p-1), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
Cf. also A276075 for factorial base and A048675, A054841 for base-2 and base-10 analogs.

Programs

  • Mathematica
    nn = 60; b = MixedRadix[Reverse@ Prime@ Range@ PrimePi[nn + 1]]; Table[FromDigits[#, b] &@ Reverse@ If[n == 1, {0}, Function[k, ReplacePart[Table[0, {PrimePi[k[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, k]]@ FactorInteger@ n], {n, nn}] (* Version 10.2, or *)
    f[w_List] := Total[Times @@@ Transpose@ {Map[Times @@ # &, Prime@ Range@ Range[0, Length@ w - 1]], Reverse@ w}]; Table[f@ Reverse@ If[n == 1, {0}, Function[k, ReplacePart[Table[0, {PrimePi[k[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, k]]@ FactorInteger@ n], {n, 60}] (* Michael De Vlieger, Aug 30 2016 *)
  • PARI
    A276085(n) = { my(f = factor(n), pr=1, i=1, s=0); for(k=1, #f~, while(i <= primepi(f[k, 1])-1, pr *= prime(i); i++); s += f[k, 2]*pr); (s); }; \\ Antti Karttunen, Nov 11 2024
    
  • Python
    from sympy import primorial, primepi, factorint
    def a002110(n):
        return 1 if n<1 else primorial(n)
    def a(n):
        f=factorint(n)
        return sum(f[i]*a002110(primepi(i) - 1) for i in f)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 22 2017

Formula

a(1) = 0; for n > 1, a(n) = a(A028234(n)) + (A067029(n) * A002110(A055396(n)-1)).
a(1) = 0, a(n) = (e1*A002110(i1-1) + ... + ez*A002110(iz-1)) when n = prime(i1)^e1 * ... * prime(iz)^ez.
Other identities.
For all n >= 0:
a(A276086(n)) = n.
a(A000040(1+n)) = A002110(n).
a(A002110(1+n)) = A143293(n).
From Antti Karttunen, Apr 24 & Apr 29 2022: (Start)
a(A283477(n)) = A283985(n).
a(A108951(n)) = A346105(n). [The latter has a similar additive formula as this sequence, but instead of primorials, uses their partial sums]
When applied to sequences where a certain subset of the divisors of n has been multiplicatively encoded with the help of A276086, this yields a corresponding number-theoretical sequence, i.e. completes their computation:
a(A319708(n)) = A001065(n) and a(A353564(n)) = A051953(n).
a(A329350(n)) = A069359(n) and a(A329380(n)) = A323599(n).
In the following group, the sum of the rhs-sequences is n [on each row, as say, A328841(n)+A328842(n)=n], because the pointwise product of the corresponding lhs-sequences is A276086:
a(A053669(n)) = A053589(n) and a(A324895(n)) = A276151(n).
a(A328571(n)) = A328841(n) and a(A328572(n)) = A328842(n).
a(A351231(n)) = A351233(n) and a(A327858(n)) = A351234(n).
a(A351251(n)) = A351253(n) and a(A324198(n)) = A351254(n).
The sum or difference of the rhs-sequences is A108951:
a(A344592(n)) = A346092(n) and a(A346091(n)) = A346093(n).
a(A346106(n)) = A346108(n) and a(A346107(n)) = A346109(n).
Here the two sequences are inverse permutations of each other:
a(A328624(n)) = A328625(n) and a(A328627(n)) = A328626(n).
a(A346102(n)) = A328622(n) and a(A346233(n)) = A328623(n).
a(A346101(n)) = A289234(n). [Self-inverse]
Other correspondences:
a(A324350(x,y)) = A324351(x,y).
a(A003961(A276086(n))) = A276154(n). [The primorial base left shift]
a(A276076(n)) = A351576(n). [Sequence reinterpreting factorial base representation as a primorial base representation]
(End)

Extensions

Name amended by Antti Karttunen, Apr 24 2022
Name simplified, the old name moved to the comments - Antti Karttunen, Jun 23 2024

A059975 For n > 1, a(n) is the least number of prime factors (counted with multiplicity) of any integer with n divisors; fully additive with a(p) = p-1.

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 6, 3, 4, 5, 10, 4, 12, 7, 6, 4, 16, 5, 18, 6, 8, 11, 22, 5, 8, 13, 6, 8, 28, 7, 30, 5, 12, 17, 10, 6, 36, 19, 14, 7, 40, 9, 42, 12, 8, 23, 46, 6, 12, 9, 18, 14, 52, 7, 14, 9, 20, 29, 58, 8, 60, 31, 10, 6, 16, 13, 66, 18, 24, 11, 70, 7, 72, 37, 10, 20, 16, 15, 78, 8, 8, 41
Offset: 1

Views

Author

Yong Kong (ykong(AT)curagen.com), Mar 05 2001

Keywords

Comments

n*a(n) is the number of complex multiplications needed for the fast Fourier transform of n numbers, writing n = r1 * r2 where r1 is a prime.
This sequence with offset 1 and a(1) = 0 is completely additive with a(p^e) = e*(p-1) for prime p and e >= 0. - Werner Schulte, Feb 23 2019

Examples

			a(18) = 5 since 18 = 2*3^2, a(18) = 1*(2-1) + 2*(3-1) = 5.
		

References

  • Herbert S. Wilf, Algorithms and complexity, Internet Edition, Summer, 1994, p. 56.

Crossrefs

Essentially same as A087656 apart from offset.
Cf. A000005, A138618, A309155, A309239, A327250, A341865, A373368 [= gcd(n, a(n))], A373369 [= gcd(A001414(n), a(n))].
Cf. A003159 (positions of even terms), A096268 (with offset 1, parity of terms), A373385 (positions of multiples of 3).
Leftmost column of irregular table A355029.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A001414 (with a(p)=p), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).

Programs

  • Maple
    A059975 := proc(n)
            local a,pf,p,e ;
            a := 0 ;
            for pf in ifactors(n)[2] do
                    p := op(1,pf) ;
                    e := op(2,pf) ;
                    a := a+e*(p-1) ;
            end do:
            a ;
    end proc: # R. J. Mathar, Oct 17 2011
  • Mathematica
    Table[Total[(First /@ FactorInteger[n] - 1) Last /@ FactorInteger[n]], {n, 1, 100}] (* Danny Marmer, Nov 13 2014 *)
    f[p_, e_] := e*(p - 1); a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Mar 27 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i, 2]*(f[i, 1] - 1));} \\ Amiram Eldar, Mar 27 2023

Formula

a(n) = Sum ( e_i * (p_i - 1) ) where n = Product ( p_i^e_i ) is the canonical factorization of n.
a(n) = min(A001222(x) : A000005(x)=n).
a(n) = row sums of A138618 - row products of A138618. - Mats Granvik, May 23 2013
a(n) = A001414(n) - A001222(n). - David James Sycamore, Jul 17 2019
a(n) = n - A341865(n). - Antti Karttunen, Jun 05 2024

Extensions

Definition revised by Hugo van der Sanden, May 21 2010
Term a(1)=0 prepended and Werner Schulte's comment adopted as an alternative definition - Antti Karttunen, Jun 05 2024

A060389 a(1)=p_1, a(2)=p_1 + p_1*p_2, a(3)=p_1 + p_1*p_2 + p_1*p_2*p_3, ... where p_i is the i-th prime.

Original entry on oeis.org

2, 8, 38, 248, 2558, 32588, 543098, 10242788, 233335658, 6703028888, 207263519018, 7628001653828, 311878265181038, 13394639596851068, 628284422185342478, 33217442899375387208, 1955977793053588026278
Offset: 1

Views

Author

Jason Earls, Apr 04 2001

Keywords

Comments

Partial sums of the primorials A002110 starting from 2. - Charles R Greathouse IV, Feb 05 2014
All terms are even. From a(98) on, all terms are multiples of 523. - Charles R Greathouse IV, Feb 05 2014
The only values of n for which a(n)/2 is prime are: 3, 5, 7, 11, 15, 47, 49. The corresponding 7 primes are: 19, 1279, 271549, 103631759509, 314142211092671239, 826811434211869939736645732264127163964562391958563586838409421490271014424018927729, 41839936239750050346953677118447851613901200239299781782205558511980130628486398081201749. - Amiram Eldar, May 04 2017

Examples

			a(4) = 248 because p_1 + p_1*p_2 + p_1*p_2*p_3 + p_1*p_2*p_3*p_4 = 2 + 6 + 30 + 210 = 248.
a(5) = 2558: A002110(3) = 30, A286624(4) = 85, a(2) = 8; 30*85 + 8 = 2558. - _Bob Selcoe_, Oct 12 2017
		

Crossrefs

Programs

  • Maple
    for n from 1 to 30 do printf(`%d,`,sum(product(ithprime(i), i=1..j), j=1..n)) od:
  • Mathematica
    Accumulate[Denominator[Accumulate[1/Prime[Range[20]]]]] (* Alonso del Arte, Mar 21 2013 *)
    Accumulate@ FoldList[Times, Prime@ Range@ 17] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    a(n)=my(s,P=1); forprime(p=2,prime(n),s+=P*=p); s \\ Charles R Greathouse IV, Feb 05 2014

Formula

a(n) = A002110(n-2)*A286624(n-1) + a(n-3), n >= 4. - Bob Selcoe, Oct 12 2017
a(n) = A276085(A070826(1+n)) = A084737(2+n)-2 = A373158(A002110(n)). - Antti Karttunen, Feb 06 2024, Oct 28 2024

Extensions

More terms from James Sellers, Apr 05 2001

A373988 Lexicographically earliest infinite sequence such that a(i) = a(j) => A373986(i) = A373986(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 25 2024

Keywords

Comments

Restricted growth sequence transform of A373986.
For all i, j >= 1: A305800(i) = A305800(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A373986(n) = { my(f=factor(n),m=1,s=0); for(i=1, #f~, my(x=prod(i=1,primepi(f[i, 1]),prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); s/gcd(m,s); };
    v373988 = rgs_transform(vector(up_to, n, A373986(n)));
    A373988(n) = v373988[n];
Showing 1-10 of 11 results. Next