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

A344760 "Inverted variant" of A342002: a(n) = A342002(A289234(n)).

Original entry on oeis.org

0, 1, 1, 5, 2, 7, 1, 7, 8, 31, 13, 41, 3, 11, 14, 43, 19, 53, 2, 9, 11, 37, 16, 47, 4, 13, 17, 49, 22, 59, 1, 9, 10, 41, 17, 55, 12, 59, 71, 247, 106, 317, 26, 87, 113, 331, 148, 401, 19, 73, 92, 289, 127, 359, 33, 101, 134, 373, 169, 443, 4, 15, 19, 59, 26, 73, 27, 89, 116, 337, 151, 407, 41, 117, 158, 421, 193, 491, 34
Offset: 0

Views

Author

Antti Karttunen, Jul 10 2021

Keywords

Crossrefs

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A003557(n) = (n/factorback(factorint(n)[, 1]));
    A342001(n) = (A003415(n) / A003557(n));
    A346101(n) = { my(pr=1, p=2, m=1); while(n>0, my(d=n%p); if(d>0, m *= p^lift(1/Mod(d, p))); pr *= p; n \= p; p = nextprime(1+p)); return(m); };
    A344760(n) = A342001(A346101(n));
    
  • PARI
    A289234(n) = { my(pr=1, p=2, v=0); while(n>0, my (d=n%p); if(d>0, v += pr * lift(1/Mod(d, p))); pr *= p; n \= p; p = nextprime(1+p)); return(v); }; \\ From A289234.
    A342002(n) = { my(s=0, m=1, p=2, e); while(n, e = (n%p); m *= p^(e>0); s += (e/p); n = n\p; p = nextprime(1+p)); (s*m); };
    A344760(n) = A342002(A289234(n));

Formula

a(n) = A342001(A346101(n)) = A342002(A289234(n)).

A346101 "Inverted variant" of A276086: a(n) = A276086(A289234(n)).

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 5, 10, 15, 30, 45, 90, 125, 250, 375, 750, 1125, 2250, 25, 50, 75, 150, 225, 450, 625, 1250, 1875, 3750, 5625, 11250, 7, 14, 21, 42, 63, 126, 35, 70, 105, 210, 315, 630, 875, 1750, 2625, 5250, 7875, 15750, 175, 350, 525, 1050, 1575, 3150, 4375, 8750, 13125, 26250, 39375, 78750, 2401, 4802, 7203, 14406
Offset: 0

Views

Author

Antti Karttunen, Jul 10 2021

Keywords

Crossrefs

Programs

  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A289234(n) = { my(pr=1, p=2, v=0); while(n>0, my (d=n%p); if(d>0, v += pr * lift(1/Mod(d, p))); pr *= p; n \= p; p = nextprime(1+p)); return(v); }; \\ From A289234.
    A346101(n) = A276086(A289234(n));
    
  • PARI
    A346101(n) = { my(p=2, m=1); while(n>0, my(d=n%p); if(d>0, m *= p^lift(1/Mod(d, p))); n \= p; p = nextprime(1+p)); return(m); };

Formula

a(n) = A276086(A289234(n)).

A331172 a(n) = min(n, A289234(n)), where A289234 is primorial base "reciprocal" flip.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 12, 13, 14, 15, 16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 42, 43, 44, 45, 46, 47, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Jan 12 2020

Keywords

Comments

For all i, j:
a(i) = a(j) => A267263(i) = A267263(j).
For all i, j > 0:
a(i) = a(j) => A053669(i) = A053669(j).

Crossrefs

Programs

  • PARI
    A289234(n) = { my(pr=1, p=2, v=0); while(n>0, my (d=n%p); if(d>0, v += pr * lift(1/Mod(d, p))); pr *= p; n \= p; p = nextprime(p+1)); return(v); }; \\ From A289234.
    A331172(n) = min(n, A289234(n));

Formula

a(n) = min(n, A289234(n)).

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

A342002 Čiurlionis sequence: Arithmetic derivative without its inherited divisor applied to the primorial base exp-function: a(n) = A342001(A276086(n)).

Original entry on oeis.org

0, 1, 1, 5, 2, 7, 1, 7, 8, 31, 13, 41, 2, 9, 11, 37, 16, 47, 3, 11, 14, 43, 19, 53, 4, 13, 17, 49, 22, 59, 1, 9, 10, 41, 17, 55, 12, 59, 71, 247, 106, 317, 19, 73, 92, 289, 127, 359, 26, 87, 113, 331, 148, 401, 33, 101, 134, 373, 169, 443, 2, 11, 13, 47, 20, 61, 17, 69, 86, 277, 121, 347, 24, 83, 107, 319, 142, 389, 31
Offset: 0

Views

Author

Antti Karttunen, Feb 28 2021

Keywords

Comments

The scatter plot shows an interesting structure.
The terms are essentially the "wild" or "unherited" part of the arithmetic derivative (A003415) of those natural numbers (A048103) that are not immediately beyond all hope of reaching zero by iteration (as the terms of A100716 are), ordered by the primorial base expansion of n as in A276086. Sequence A342018 shows the positions of the terms here that have just moved to the "no hope" region, while A342019 shows how many prime powers in any term have breached the p^p limit. Note that the results are same as for A327860(n), as the division by "regular part", A328572(n) does not affect the "wild part" of the arithmetic derivative of A276086(n). - Antti Karttunen, Mar 12 2021
I decided to name this sequence in honor of Lithuanian artist Mikalojus Čiurlionis, 1875 - 1911, as the scatter plot of this sequence reminds me thematically of his work "Pyramid sonata", with similar elements: fractal repetition in different scales and high tension present, discharging as lightning. Like Čiurlionis's paintings, this sequence has many variations, see the Formula and Crossrefs sections. - Antti Karttunen, Apr 30 2022

Crossrefs

Cf. A342463 [= a(A329886(n))], A342920 [= a(A108951(n))], A342921 [= a(A276156(n))], A342017 [= A342007(a(n))], A342019 [= A129251(a(n))].
Cf. A166486 (a(n) mod 2, parity of terms, see comment in A327860), A353640 (a(n) mod 4).
Cf. A344760, A344761, A344762, A346252, A346253 and A345930, A353572, A353574 for permuted and other variants.
Cf. A351952 (similar definition, but using factorial base, with quite a different look).

Programs

  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A342002(n) = A342001(A276086(n)); \\ Uses also code from A342001.
    
  • PARI
    A342002(n) = { my(s=0, m=1, p=2, e); while(n, e = (n%p); m *= p^(e>0); s += (e/p); n = n\p; p = nextprime(1+p)); (s*m); }; \\ Antti Karttunen, Mar 12 2021
    
  • PARI
    A342002(n) = { my(s=0, p=2, e); while(n, e = (n%p); s += (e/p); n = n\p; p = nextprime(1+p)); numerator(s); }; \\ (Taking denominator instead would give A328571) - Antti Karttunen, Mar 12 2021

Formula

a(n) = A342001(A276086(n)) = A083345(A276086(n)).
a(n) = A327860(n) / A328572(n) = A003415(A276086(n)) / A003557(A276086(n)).
From Antti Karttunen, Jul 18 2021: (Start)
There are several permutations of this sequence. The following formulas show the relations:
a(n) = A344760(A289234(n)).
a(n) = A346252(A328623(n)) = A346253(A328622(n)).
a(n) = A344761(A328626(n)) = A344762(A328625(n)).
(End)

Extensions

Sequence renamed as "Čiurlionis sequence" to honor Lithuanian artist Mikalojus Čiurlionis - Antti Karttunen, Apr 30 2022

A328625 In primorial base representation of n, multiply all other digits except the least significant with 1+{their right hand side neighbor}, and reduce each modulo prime(k) (with k > 1) to get a new digit for the position k (the least significant digit stays as it is), then convert back to decimal.

Original entry on oeis.org

0, 1, 2, 5, 4, 3, 6, 7, 14, 17, 22, 21, 12, 13, 26, 29, 10, 9, 18, 19, 8, 11, 28, 27, 24, 25, 20, 23, 16, 15, 30, 31, 32, 35, 34, 33, 66, 67, 74, 77, 82, 81, 102, 103, 116, 119, 100, 99, 138, 139, 128, 131, 148, 147, 174, 175, 170, 173, 166, 165, 60, 61, 62, 65, 64, 63, 126, 127, 134, 137, 142, 141, 192, 193, 206, 209, 190, 189, 48, 49, 38, 41, 58, 57, 114
Offset: 0

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Comments

In primorial base (see A049345) we keep the least significant digit (0 or 1) intact, and replace each digit d(i) left of that (for i >= 2) with a new digit value computed as d(i)*(1+d(i-1)) mod prime(i). a(n) is then the newly constructed primorial expansion converted back to decimal.
Because for all primes p, Z_p is a field (not just a ring), this sequence is a permutation of nonnegative integers, and roughly speaking, offers a kind of analog of A003188 for primorial base system. Note however that it is the digit neighbor on the right (not left) hand side that affects here what will be the new digit at each position.

Examples

			In primorial base (A049345) 199 is written as "6301" because 6*A002110(3) + 3*A002110(2) + 0*A002110(1) + 1*A002110(0) = 6*30 + 3*6 + 0*2 + 1*1 = 199. Multiplying each digit left of the least significant by 1+{digit one step right}, and reducing modulo the corresponding prime yields 4*6 mod 7, 1*3 mod 5, 2*0 mod 3, (with the least significant 1 staying the same), so we get "3301", which is the primorial base expansion of 109, thus a(199) = 109.
		

Crossrefs

Cf. A002110, A049345, A276085, A328620, A328624, A328626 (inverse permutation), A328628.
Cf. also A003188, A289234, A328622.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
    A328624(n) = { my(m=1, p=2, e, g=1); while(n, e = (n%p); m *= (p^((g*e)%p)); g = e+1; n = n\p; p = nextprime(1+p)); (m); };
    A328625(n) = A276085(A328624(n));

Formula

a(n) = A276085(A328624(n)).
For all n, A328620(a(n)) = A328620(n).

A328622 In primorial base representation of n, multiply by 2 all other digits except the least significant, and reduce each such product modulo prime(k) (to get the new digit), where k > 1 is the position of the digit, then convert back to decimal.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 12, 13, 16, 17, 14, 15, 24, 25, 28, 29, 26, 27, 6, 7, 10, 11, 8, 9, 18, 19, 22, 23, 20, 21, 60, 61, 64, 65, 62, 63, 72, 73, 76, 77, 74, 75, 84, 85, 88, 89, 86, 87, 66, 67, 70, 71, 68, 69, 78, 79, 82, 83, 80, 81, 120, 121, 124, 125, 122, 123, 132, 133, 136, 137, 134, 135, 144, 145, 148, 149, 146, 147, 126, 127, 130, 131
Offset: 0

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Examples

			In primorial base (A049345) 199 is written as "6301" because 6*A002110(3) + 3*A002110(2) + 0*A002110(1) + 1*A002110(0) = 6*30 + 3*6 + 0*2 + 1*1 = 199. Multiplying each digit except the least significant by 2, and then reducing them modulo the corresponding prime leaves us with 2*6 mod 7, 2*3 mod 5, 2*0 mod 3, (with the least significant 1 staying the same), so we get "5101", which is the primorial base expansion of 157, thus a(199) = 157.
For 157, the new "doubled and reduced" expansion is 2*5 mod 7, 2*1 mod 5, 2*0 mod 3 and the trailing 1 stays intact, so we get "3201", which is the primorial base expansion of 103, thus a(157) = 103.
		

Crossrefs

Cf. A328623 (inverse), and also A289234.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328618(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k,1]!=2), f[k, 2] = q*f[k, 1] + ((2*f[k, 2])%f[k, 1]))); factorback(f); };
    A328622(n) = A276085(A328618(A276086(n)));

Formula

a(n) = A276085(A328618(A276086(n))).

A328626 Inverse permutation to A328625.

Original entry on oeis.org

0, 1, 2, 5, 4, 3, 6, 7, 20, 17, 16, 21, 12, 13, 8, 29, 28, 9, 18, 19, 26, 11, 10, 27, 24, 25, 14, 23, 22, 15, 30, 31, 32, 35, 34, 33, 126, 127, 80, 167, 166, 81, 162, 163, 128, 119, 118, 129, 78, 79, 116, 131, 130, 117, 114, 115, 164, 83, 82, 165, 60, 61, 62, 65, 64, 63, 36, 37, 140, 107, 106, 141, 102, 103, 38, 209, 208, 39, 138, 139, 206, 41, 40
Offset: 0

Views

Author

Antti Karttunen, Oct 25 2019

Keywords

Crossrefs

Cf. A328625 (inverse permutation).
Cf. also A289234, A328623.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
    A328627(n) = { my(m=1, p=2, d=0); while(n, d = lift(Mod(n,p)/(d+1)); m *= (p^d); n = n\p; p = nextprime(1+p)); (m); };
    A328626(n) = A276085(A328627(n));

Formula

a(n) = A276085(A328627(n)).
For all n, A328620(a(n)) = A328620(n).

A328623 Inverse permutation to A328622.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 18, 19, 22, 23, 20, 21, 6, 7, 10, 11, 8, 9, 24, 25, 28, 29, 26, 27, 12, 13, 16, 17, 14, 15, 120, 121, 124, 125, 122, 123, 138, 139, 142, 143, 140, 141, 126, 127, 130, 131, 128, 129, 144, 145, 148, 149, 146, 147, 132, 133, 136, 137, 134, 135, 30, 31, 34, 35, 32, 33, 48, 49, 52, 53, 50, 51, 36, 37, 40, 41, 38, 39, 54, 55, 58, 59, 56, 57, 42
Offset: 0

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Crossrefs

Cf. A328622 (inverse), and also A289234.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328619(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k,1]!=2), f[k, 2] = q*f[k, 1] + lift(Mod(m,f[k, 1])/2))); factorback(f); };
    A328623(n) = A276085(A328619(A276086(n)));

Formula

a(n) = A276085(A328619(A276086(n))).

A305458 In primorial base: a(n) is obtained by replacing each nonzero digit of n with its product with the nonzero digits at lower indices (See Comments for precise definition).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 12, 13, 14, 15, 28, 29, 18, 19, 20, 21, 10, 11, 24, 25, 26, 27, 22, 23, 30, 31, 32, 33, 64, 65, 36, 37, 38, 39, 76, 77, 72, 73, 74, 75, 148, 149, 108, 109, 110, 111, 190, 191, 144, 145, 146, 147, 52, 53, 60, 61, 62, 63
Offset: 0

Views

Author

Rémy Sigrist, Jun 01 2018

Keywords

Comments

For a number n >= 0, let d_k, ..., d_0 be the digits of n in primorial base (n = Sum_{i=0..k} d_i * A002110(i), and for i = 0..k, 0 <= d_i < prime(i+1)); the digits of a(n) in primorial base, say e_k, ..., e_0, satisfy: for i = 0..k:
- if d_i = 0, then e_i = 0,
- if d_i > 0, then e_i == Product_{j=0..i and d_j > 0} d_j (mod prime(i+1)).
This sequence is a permutation of the nonnegative integers with inverse A305463.
The fixed points of this sequence (A305462) correspond to the numbers with all digits, except possibly the leading digit, equal to zero or one in primorial base.
Like A289234, this sequence preserves the number of digits and the number of nonzero digits in primorial base.
For any prime number p:
- we can build an analog of this sequence, say f_p, for the base p,
- in particular, f_2 = A001477,
- f_p is a permutation of the nonnegative integers,
- f_p preserves the number of digits and the number of nonzero digits in base p,
- the fixed points of f_p correspond to the numbers with all digits, except possibly the leading digit, equal to zero or one in base p.

Examples

			The digits of 7772 in primorial base are 3,4,0,0,1,0.
Also:
- 1 == 1 (mod prime(2)),
- 4 * 1 == 4 (mod prime(5)),
- 3 * 4 * 1 == 12 (mod prime(6)).
Hence the digits of a(7772) in primorial base are 12,4,0,0,1,0, and a(7772) = 28562.
		

Crossrefs

Cf. A001477, A002110, A049345, A235224, A267263, A289234, A305462 (fixed points), A305463 (inverse).

Programs

  • PARI
    a(n) = my (v=0, k=1, r=2, p=1); while (n, my (d=n % r); if (d, k *= d; v += p * lift(Mod(k, r))); n \= r; p *= r; r = nextprime(r+1)); return (v)

Formula

A235224(a(n)) = A235224(n).
A267263(a(n)) = A267263(n).
Showing 1-10 of 11 results. Next