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.

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

A324198 a(n) = gcd(n, A276086(n)), where A276086 is the primorial base exp-function.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 15, 1, 1, 1, 1, 5, 3, 1, 1, 1, 25, 1, 3, 1, 1, 1, 1, 1, 3, 1, 7, 1, 1, 1, 3, 5, 1, 7, 1, 1, 15, 1, 1, 1, 7, 25, 3, 1, 1, 1, 5, 7, 3, 1, 1, 1, 1, 1, 21, 1, 1, 1, 1, 1, 3, 35, 1, 1, 1, 1, 75, 1, 7, 1, 1, 5, 3, 1, 1, 7, 5, 1, 3, 1, 1, 1, 7, 1, 3, 1, 1, 1, 1, 49, 3, 5, 1, 1, 1, 1, 105
Offset: 0

Views

Author

Antti Karttunen, Feb 25 2019

Keywords

Crossrefs

Cf. A324583 (positions of ones), A324584 (and terms larger than one).
Cf. A371098 (odd bisection), A371099 [= a(36n+9)].
Cf. also A328231.

Programs

  • Mathematica
    Array[Block[{i, m, n = #, p}, m = i = 1; While[n > 0, p = Prime[i]; m *= p^Mod[n, p]; n = Quotient[n, p]; i++]; GCD[#, m]] &, 106, 0] (* Michael De Vlieger, Feb 04 2022 *)
  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A324198(n) = gcd(n,A276086(n));
    
  • PARI
    A324198(n) = { my(m=1, p=2, orgn=n); while(n, m *= (p^min(n%p,valuation(orgn,p))); n = n\p; p = nextprime(1+p)); (m); }; \\ Antti Karttunen, Oct 21 2019

Formula

a(n) = gcd(n, A276086(n)).
From Antti Karttunen, Oct 21 2019: (Start)
A000005(a(n)) = A327168(n).
a(A328316(n)) = A328323(n).
a(n) = A324580(n) / A328584(n).
(End)

A329041 Square array read by antidiagonals: A(n, k) = A327936(A276086(n) * A276086(k)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 03 2019

Keywords

Comments

Array A(n, k) is symmetric, and is read as (n,k) = (0, 0), (1, 0), (0, 1), (2, 0), (1, 1), (0, 2), (3, 0), (2, 1), (1, 2), (0, 3), ...
If A(n, k) is 1, it tells that adding of n and k do not generate any carries, when done in primorial base (A049345). If A(n, k) is larger than one, then its prime factors indicate in which specific moduli (digit positions) the sum was larger than allowed for that position.

Examples

			The top left corner of the array:
        0  1  2  3  4  5  6  7  8  9 10 11 12
      +--------------------------------------
   0: | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   1: | 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...
   2: | 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 1, ...
   3: | 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, ...
   4: | 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 1, ...
   5: | 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, ...
   6: | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   7: | 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...
   8: | 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 1, ...
   9: | 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, ...
  10: | 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 1, ...
  11: | 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, ...
  12: | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
...
A(11,25) = A(25,11) = 10 because 11 is written in primorial base representation (A049345) as "121" and 25 as "401", and when these are added together digit by digit, we see that the maximal allowed digits "421" for the rightmost three positions are exceeded in positions 1 and 3, with the 1st and 3rd primes 2 and 5 as their moduli, thus A(11,25) = 2*5 = 10.
		

Crossrefs

Programs

  • PARI
    up_to = 105;
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A327936(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]>=f[k,1])); factorback(f); };
    A329041sq(row,col) = A327936(A276086(row)*A276086(col));
    A329041list(up_to) = { my(v = vector(up_to), i=0); for(a=0,oo, for(col=0,a, if(i++ > up_to, return(v)); v[i] = A329041sq(a-col,col))); (v); };
    v329041 = A329041list(up_to);
    A329041(n) = v329041[1+n];

Formula

A(n, k) = A327936(A276086(n) * A276086(k)).
For all n, A(A328841(n), A328842(n)) = 1 and A(A328770(n), A328770(n)) = 1.

A324350 Square array read by antidiagonals: A(x,y) = gcd(A276086(x),A276086(y)), for x, y >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 3, 3, 1, 1, 1, 2, 3, 6, 3, 2, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 2, 1, 6, 9, 6, 1, 2, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 2, 3, 2, 1, 18, 1, 2, 3, 2, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 1, 1, 1, 2, 3, 6, 3, 2, 5, 2, 3, 6, 3, 2, 1, 1, 1, 3, 3, 3, 3, 5, 5, 3, 3, 3, 3, 1, 1, 1, 2, 1, 6, 9, 6, 5, 10, 5, 6, 9, 6, 1, 2, 1
Offset: 0

Views

Author

Antti Karttunen, Feb 25 2019

Keywords

Examples

			The array A begins:
       0   1   2   3   4   5   6   7   8   9  10  11  12
  x/y  ------------------------------------------------------
   0:  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
   1:  1,  2,  1,  2,  1,  2,  1,  2,  1,  2,  1,  2,  1, ...
   2:  1,  1,  3,  3,  3,  3,  1,  1,  3,  3,  3,  3,  1, ...
   3:  1,  2,  3,  6,  3,  6,  1,  2,  3,  6,  3,  6,  1, ...
   4:  1,  1,  3,  3,  9,  9,  1,  1,  3,  3,  9,  9,  1, ...
   5:  1,  2,  3,  6,  9, 18,  1,  2,  3,  6,  9, 18,  1, ...
   6:  1,  1,  1,  1,  1,  1,  5,  5,  5,  5,  5,  5,  5, ...
   7:  1,  2,  1,  2,  1,  2,  5, 10,  5, 10,  5, 10,  5, ...
   8:  1,  1,  3,  3,  3,  3,  5,  5, 15, 15, 15, 15,  5, ...
   9:  1,  2,  3,  6,  3,  6,  5, 10, 15, 30, 15, 30,  5, ...
  10:  1,  1,  3,  3,  9,  9,  5,  5, 15, 15, 45, 45,  5, ...
  11:  1,  2,  3,  6,  9, 18,  5, 10, 15, 30, 45, 90,  5, ...
  12:  1,  1,  1,  1,  1,  1,  5,  5,  5,  5,  5,  5, 25, ...
		

Crossrefs

Cf. A003989, A276086 (central diagonal), A324198, A324351.

Programs

  • PARI
    up_to = 65703; \\ = binomial(362+1,2)
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A324350sq(row,col) = gcd(A276086(row),A276086(col));
    A324350list(up_to) = { my(v = vector(up_to), i=0); for(a=0,oo, for(col=0,a, if(i++ > up_to, return(v)); v[i] = A324350sq(a-col,col))); (v); };
    v324350 = A324350list(up_to);
    A324350(n) = v324350[1+n];

Formula

A(x,y) = gcd(A276086(x), A276086(y)).
A(x,y) = A276086(A324351(x,y)).

A324384 a(n) = gcd(n, A276154(n)), where A276154 is the primorial base left shift.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 11, 12, 1, 2, 1, 8, 1, 18, 1, 4, 7, 2, 1, 24, 1, 2, 1, 4, 1, 30, 1, 8, 1, 2, 7, 12, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 52, 1, 6, 1, 56, 1, 2, 1, 60, 1, 2, 1, 16, 1, 6, 1, 4, 1, 14, 1, 24, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 8, 1, 90, 1, 4, 1, 2, 1, 12, 1, 2, 1, 4, 1, 6, 1, 8, 1
Offset: 0

Views

Author

Antti Karttunen, Feb 26 2019

Keywords

Comments

For a very few primes, a(p) > 1 (then by necessity a(p) = p). In range 2 .. 2^25 there are three: 2, 11, 119039.

Crossrefs

Programs

Formula

a(n) = gcd(n, A276154(n)).
Showing 1-5 of 5 results.