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

A324642 Number of iterations of map x -> x + A002110(A235224(x)) required to reach a composite when starting from x = n. Here A002110(A235224(x)) gives the least primorial number > x.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Examples

			For n=1, it is not a composite number, so we add a next larger primorial (A002110) to it, which is 2, and we see that 3 is also noncomposite, thus we add to that the next larger primorial, which is 6, but now 3+6 = 9 is composite, which we reached in two iteration steps, thus a(1) = 2.
For n = 97, the iteration goes as: 97 -> 307 -> 2617 -> 32647 -> 543157 -> 10242847 -> 233335717 -> 6703028947 -> 207263519077, and only the last term shown is composite, thus a(97) = 8. Written in primorial base (A049345), the terms in that trajectory look as: 3101, 13101, 113101, 1113101, 11113101, 111113101, 1111113101, 11111113101 and 111111113101.
		

Crossrefs

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n, p=2) = if(nA235224(n\p, nextprime(p+1)));
    A324642(n) = { my(k=0); while((1==n)||isprime(n), n += A002110(A235224(n)); k++); (k); };

Formula

If n is composite, a(n) = 0, and for noncomposite n, a(n) = 1 + a(n+A002110(A235224(n))).

A276086 Primorial base exp-function: digits in primorial base representation of n become the exponents of successive prime factors whose product a(n) is.

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 5, 10, 15, 30, 45, 90, 25, 50, 75, 150, 225, 450, 125, 250, 375, 750, 1125, 2250, 625, 1250, 1875, 3750, 5625, 11250, 7, 14, 21, 42, 63, 126, 35, 70, 105, 210, 315, 630, 175, 350, 525, 1050, 1575, 3150, 875, 1750, 2625, 5250, 7875, 15750, 4375, 8750, 13125, 26250, 39375, 78750, 49, 98, 147, 294, 441, 882, 245, 490, 735, 1470, 2205, 4410, 1225, 2450
Offset: 0

Views

Author

Antti Karttunen, Aug 21 2016

Keywords

Comments

Prime product form of primorial base expansion of n.
Sequence is a permutation of A048103. It maps the smallest prime not dividing n to the smallest prime dividing n, that is, A020639(a(n)) = A053669(n) holds for all n >= 1.
The sequence satisfies the exponential function identity, a(x + y) = a(x) * a(y), whenever A329041(x,y) = 1, that is, when adding x and y together will not generate any carries in the primorial base. Examples of such pairs of x and y are A328841(n) & A328842(n), and also A328770(n) (when added with itself). - Antti Karttunen, Oct 31 2019
From Antti Karttunen, Feb 18 2022: (Start)
The conjecture given in A327969 asks whether applying this function together with the arithmetic derivative (A003415) in some combination or another can eventually transform every positive integer into zero.
Another related open question asks whether there are any other numbers than n=6 such that when starting from that n and by iterating with A003415, one eventually reaches a(n). See comments in A351088.
This sequence is used in A351255 to list the terms of A099308 in a different order, by the increasing exponents of the successive primes in their prime factorization. (End)
From Bill McEachen, Oct 15 2022: (Start)
From inspection, the least significant decimal digits of a(n) terms form continuous chains of 30 as follows. For n == i (mod 30), i=0..5, there are 6 ordered elements of these 8 {1,2,3,6,9,8,7,4}. Then for n == i (mod 30), i=6..29, there are 12 repeated pairs = {5,0}.
Moreover, when the individual elements of any of the possible groups of 6 are transformed via (7*digit) (mod 10), the result matches one of the other 7 groupings (not all 7 may be seen). As example, {1,2,3,6,9,8} transforms to {7,4,1,2,3,6}. (End)
The least significant digit of a(n) in base 4 is given by A353486, and in base 6 by A358840. - Antti Karttunen, Oct 25 2022, Feb 17 2024

Examples

			For n = 24, which has primorial base representation (see A049345) "400" as 24 = 4*A002110(2) + 0*A002110(1) + 0*A002110(0) = 4*6 + 0*2 + 0*1, thus a(24) = prime(3)^4 * prime(2)^0 * prime(1)^0 = 5^4 = 625.
For n = 35 = "1021" as 35 = 1*A002110(3) + 0*A002110(2) + 2*A002110(1) + 1*A002110(0) = 1*30 + 0*6 + 2*2 + 1*1, thus a(35) = prime(4)^1 * prime(2)^2 * prime(1) = 7 * 3*3 * 2 = 126.
		

Crossrefs

Cf. A276085 (a left inverse) and also A276087, A328403.
Cf. A048103 (terms sorted into ascending order), A100716 (natural numbers not present in this sequence).
Cf. A278226 (associated filter-sequence), A286626 (and its rgs-version), A328477.
Cf. A328316 (iterates started from zero).
Cf. A327858, A327859, A327860, A327963, A328097, A328098, A328099, A328110, A328112, A328382 for various combinations with arithmetic derivative (A003415).
Cf. also A327167, A329037.
Cf. A019565 and A054842 for base-2 and base-10 analogs and A276076 for the analogous "factorial base exp-function", from which this differs for the first time at n=24, where a(24)=625 while A276076(24)=7.
Cf. A327969, A351088, A351458 for sequences with conjectures involving this sequence.

Programs

  • Mathematica
    b = MixedRadix[Reverse@ Prime@ Range@ 12]; Table[Function[k, Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ k, Reverse@ k}]@ IntegerDigits[n, b], {n, 0, 51}] (* Michael De Vlieger, Aug 23 2016, Version 10.2 *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, Reverse@ f@ n], {n, 0, 73}] (* Michael De Vlieger, Aug 30 2016, Pre-Version 10 *)
    a[n0_] := Module[{m = 1, i = 1, n = n0, p}, While[n > 0, p = Prime[i]; m *= p^Mod[n, p]; n = Quotient[n, p]; i++]; m];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 01 2021, after Antti Karttunen's Sage code *)
  • 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; }; \\ Antti Karttunen, May 12 2017
    
  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); }; \\ (Better than above one, avoids unnecessary construction of primorials). - Antti Karttunen, Oct 14 2019
    
  • Python
    from sympy import prime
    def a(n):
        i=0
        m=pr=1
        while n>0:
            i+=1
            N=prime(i)*pr
            if n%N!=0:
                m*=(prime(i)**((n%N)/pr))
                n-=n%N
            pr=N
        return m # Indranil Ghosh, May 12 2017, after Antti Karttunen's PARI code
    
  • Python
    from sympy import nextprime
    def a(n):
        m, p = 1, 2
        while n > 0:
            n, r = divmod(n, p)
            m *= p**r
            p = nextprime(p)
        return m
    print([a(n) for n in range(74)])  # Peter Luschny, Apr 20 2024
  • Sage
    def A276086(n):
        m=1
        i=1
        while n>0:
            p = sloane.A000040(i)
            m *= (p**(n%p))
            n = floor(n/p)
            i += 1
        return (m)
    # Antti Karttunen, Oct 14 2019, after Indranil Ghosh's Python code above, and my own leaner PARI code from Oct 14 2019. This avoids unnecessary construction of primorials.
    
  • Scheme
    (define (A276086 n) (let loop ((n n) (t 1) (i 1)) (if (zero? n) t (let* ((p (A000040 i)) (d (modulo n p))) (loop (/ (- n d) p) (* t (expt p d)) (+ 1 i))))))
    
  • Scheme
    (definec (A276086 n) (if (zero? n) 1 (* (expt (A053669 n) (A276088 n)) (A276086 (A276093 n))))) ;; Needs macro definec from http://oeis.org/wiki/Memoization#Scheme
    
  • Scheme
    (definec (A276086 n) (if (zero? n) 1 (* (A053669 n) (A276086 (- n (A002110 (A276084 n))))))) ;; Needs macro definec from http://oeis.org/wiki/Memoization#Scheme
    

Formula

a(0) = 1; for n >= 1, a(n) = A053669(n) * a(A276151(n)) = A053669(n) * a(n-A002110(A276084(n))).
a(0) = 1; for n >= 1, a(n) = A053669(n)^A276088(n) * a(A276093(n)).
a(n) = A328841(a(n)) + A328842(a(n)) = A328843(n) + A328844(n).
a(n) = a(A328841(n)) * a(A328842(n)) = A328571(n) * A328572(n).
a(n) = A328475(n) * A328580(n) = A328476(n) + A328580(n).
a(A002110(n)) = A000040(n+1). [Maps primorials to primes]
a(A143293(n)) = A002110(n+1). [Maps partial sums of primorials to primorials]
a(A057588(n)) = A276092(n).
a(A276156(n)) = A019565(n).
a(A283477(n)) = A324289(n).
a(A003415(n)) = A327859(n).
Here the text in brackets shows how the right hand side sequence is a function of the primorial base expansion of n:
A001221(a(n)) = A267263(n). [Number of nonzero digits]
A001222(a(n)) = A276150(n). [Sum of digits]
A067029(a(n)) = A276088(n). [The least significant nonzero digit]
A071178(a(n)) = A276153(n). [The most significant digit]
A061395(a(n)) = A235224(n). [Number of significant digits]
A051903(a(n)) = A328114(n). [Largest digit]
A055396(a(n)) = A257993(n). [Number of trailing zeros + 1]
A257993(a(n)) = A328570(n). [Index of the least significant zero digit]
A079067(a(n)) = A328620(n). [Number of nonleading zeros]
A056169(a(n)) = A328614(n). [Number of 1-digits]
A056170(a(n)) = A328615(n). [Number of digits larger than 1]
A277885(a(n)) = A328828(n). [Index of the least significant digit > 1]
A134193(a(n)) = A329028(n). [The least missing nonzero digit]
A005361(a(n)) = A328581(n). [Product of nonzero digits]
A072411(a(n)) = A328582(n). [LCM of nonzero digits]
A001055(a(n)) = A317836(n). [Number of carry-free partitions of n in primorial base]
Various number theoretical functions applied:
A000005(a(n)) = A324655(n). [Number of divisors of a(n)]
A000203(a(n)) = A324653(n). [Sum of divisors of a(n)]
A000010(a(n)) = A324650(n). [Euler phi applied to a(n)]
A023900(a(n)) = A328583(n). [Dirichlet inverse of Euler phi applied to a(n)]
A069359(a(n)) = A329029(n). [Sum a(n)/p over primes p dividing a(n)]
A003415(a(n)) = A327860(n). [Arithmetic derivative of a(n)]
Other identities:
A276085(a(n)) = n. [A276085 is a left inverse]
A020639(a(n)) = A053669(n). [The smallest prime not dividing n -> the smallest prime dividing n]
A046523(a(n)) = A278226(n). [Least number with the same prime signature as a(n)]
A246277(a(n)) = A329038(n).
A181819(a(n)) = A328835(n).
A053669(a(n)) = A326810(n), A326810(a(n)) = A328579(n).
A257993(a(n)) = A328570(n), A328570(a(n)) = A328578(n).
A328613(a(n)) = A328763(n), A328620(a(n)) = A328766(n).
A328828(a(n)) = A328829(n).
A053589(a(n)) = A328580(n). [Greatest primorial number which divides a(n)]
A276151(a(n)) = A328476(n). [... and that primorial subtracted from a(n)]
A111701(a(n)) = A328475(n).
A328114(a(n)) = A328389(n). [Greatest digit of primorial base expansion of a(n)]
A328389(a(n)) = A328394(n), A328394(a(n)) = A328398(n).
A235224(a(n)) = A328404(n), A328405(a(n)) = A328406(n).
a(A328625(n)) = A328624(n), a(A328626(n)) = A328627(n). ["Twisted" variants]
a(A108951(n)) = A324886(n).
a(n) mod n = A328386(n).
a(a(n)) = A276087(n), a(a(a(n))) = A328403(n). [2- and 3-fold applications]
a(2n+1) = 2 * a(2n). - Antti Karttunen, Feb 17 2022

Extensions

Name edited and new link-formulas added by Antti Karttunen, Oct 29 2019
Name changed again by Antti Karttunen, Feb 05 2022

A049345 n written in primorial base.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 100, 101, 110, 111, 120, 121, 200, 201, 210, 211, 220, 221, 300, 301, 310, 311, 320, 321, 400, 401, 410, 411, 420, 421, 1000, 1001, 1010, 1011, 1020, 1021, 1100, 1101, 1110, 1111, 1120, 1121, 1200, 1201, 1210, 1211, 1220, 1221, 1300, 1301, 1310, 1311
Offset: 0

Views

Author

Keywords

Comments

Places reading from right have values (1, 2, 6, 30, 210, ...) = primorials.
For n < 10 * 7# = 2100: a(n) = concatenation of n-th row in A235168 and for n > 0: A055642(a(n)) = A235224(n); for larger numbers the representation in A235168 is more appropriate. - Reinhard Zumkeller, Jan 05 2014
In the long run, numbers have fewer digits in the primorial base than in the factorial base (cf. A007623), since factorial(n) < n^n < primorial(n) for n > 12. However, the point where the digits become larger than 9 comes earlier: as soon as 10*7*5*3*2 = 2100 for the primorial base vs 10! = 3628800 in the factorial base. From there on, the representation using concatenation of digits written in decimal becomes ambiguous. - M. F. Hasler, Sep 22 2014

Crossrefs

Cf. A000040, A002110 (primorials), A235168, A235224, A276086, A276150.
Cf. factorial base A007623.

Programs

  • Haskell
    a049345 n | n < 2100  = read $ concatMap show (a235168_row n) :: Int
              | otherwise = error "ambiguous primorial representation"
    -- Reinhard Zumkeller, Jan 05 2014
    
  • Mathematica
    Table[FromDigits@ IntegerDigits[n, MixedRadix[Reverse@ Prime@ Range@ 8]], {n, 0, 51}] (* Michael De Vlieger, Aug 23 2016, Version 10.2 *)
  • PARI
    A049345(n, p=2) = if(nA049345(n\p, nextprime(p+1))*10 + n%p) \\ Valid at least up to the point where digits > 9 would arise (n=10*7*5*3*2), thereafter the definition of the sequence is ambiguous. M. F. Hasler, Sep 22 2014
    
  • Python
    from sympy import nextprime
    def a(n, p=2):
        if n>2099: print("Error! Ambiguous primorial representation when n is larger than 2099")
        else: return n if n
  • Scheme
    (define (A049345 n) (if (>= n 2100) (error "A049345: ambiguous primorial representation when n is larger than 2099:" n) (let loop ((n n) (s 0) (t 1) (i 1)) (if (zero? n) s (let* ((p (A000040 i)) (d (modulo n p))) (loop (/ (- n d) p) (+ (* t d) s) (* 10 t) (+ 1 i)))))))
    ;; Antti Karttunen, Aug 26 2016
    

A084558 a(0) = 0; for n >= 1: a(n) = largest m such that n >= m!.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

For n >= 1, a(n) = the number of significant digits in n's factorial base representation (A007623).
After zero, which occurs once, each n occurs A001563(n) times.
Number of iterations (...(f_4(f_3(f_2(n))))...) such that the result is < 1, where f_j(x):=x/j. - Hieronymus Fischer, Apr 30 2012
For n > 0: a(n) = length of row n in table A108731. - Reinhard Zumkeller, Jan 05 2014

Examples

			a(4) = 2 because 2! <= 4 < 3!.
		

References

  • F. Smarandache, "f-Inferior and f-Superior Functions - Generalization of Floor Functions", Arizona State University, Special Collections.

Crossrefs

Programs

  • Haskell
    a084558 n = a090529 (n + 1) - 1  -- Reinhard Zumkeller, Jan 05 2014
    
  • Maple
    0, seq(m$(m*m!),m=1..5); # Robert Israel, Apr 27 2015
  • Mathematica
    Table[m = 1; While[m! <= n, m++]; m - 1, {n, 0, 104}] (* Jayanta Basu, May 24 2013 *)
    Table[Floor[Last[Reduce[x! == n && x > 0, x]]], {n, 120}] (* Eric W. Weisstein, Sep 13 2024 *)
  • PARI
    a(n)={my(m=0);while(n\=m++,);m-1} \\ R. J. Cano, Apr 09 2018
    
  • Python
    def A084558(n):
      i=1
      while n: i+=1; n//=i
      return(i-1)
    print(list(map(A084558,range(101)))) # Natalia L. Skirrow, May 28 2023

Formula

From Hieronymus Fischer, Apr 30 2012: (Start)
a(n!) = a((n-1)!)+1, for n>1.
G.f.: 1/(1-x)*Sum_{k>=1} x^(k!).
The explicit first terms of the g.f. are: (x+x^2+x^6+x^24+x^120+x^720...)/(1-x).
(End)
Other identities:
For all n >= 0, a(n) = A090529(n+1) - 1. - Reinhard Zumkeller, Jan 05 2014
For all n >= 1, a(n) = A060130(n) + A257510(n). - Antti Karttunen, Apr 27 2015
a(n) ~ log(n^2/(2*Pi)) / (2*LambertW(log(n^2/(2*Pi))/(2*exp(1)))) - 1/2. - Vaclav Kotesovec, Aug 22 2025

Extensions

Name clarified by Antti Karttunen, Apr 27 2015

A328114 Maximal digit value used when n is written in primorial base (cf. A049345).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Antti Karttunen, Oct 12 2019

Keywords

Examples

			For n = 2105, which could be expressed in primorial base for example as "T0021" (where T here stands for the digit value ten), or maybe more elegantly as [10,0,0,2,1] as 2105 = 10*A002110(4) + 2*A002110(1) + 1*A002110(0). The maximum value of these digits is 10, thus a(2105) = 10.
		

Crossrefs

Programs

  • Mathematica
    With[{b = MixedRadix[Reverse@ Prime@ Range@ 20]}, Array[Max@ IntegerDigits[#, b] &, 105, 0]] (* Michael De Vlieger, Oct 30 2019 *)
  • PARI
    A328114(n) = { my(i=0,m=0,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m = max(m,(n%nextpr)/pr); n-=(n%nextpr));pr=nextpr); (m); };
    
  • PARI
    A328114(n) = { my(s=0, p=2); while(n, s = max(s,(n%p)); n = n\p; p = nextprime(1+p)); (s); }; \\ (Faster, no unnecessary construction of primorials) - Antti Karttunen, Oct 29 2019

Formula

a(n) = A051903(A276086(n)).
a(A276156(n)) = 1 for all n >= 1.
a(n) <= A276150(n) for all n >= 0.
From Antti Karttunen, Oct 29 2019: (Start)
a(n) = A061395(A328835(n)).
For n >= 1, a(n) < A000040(A235224(n)) and a(n) <= 1 + A328391(n).
For all n >= 1, a(n) = 1+A051903(A328572(n)).
a(A276086(n)) = A328389(n), a(A276087(n)) = A328394(n), a(A328403(n)) = A328398(n).
a(A327860(n)) = A328392(n), a(A003415(n)) = A328390(n), a(A328316(n)) = A328322(n).
(End)

A235168 Triangle read by rows: row n gives digits of n in primorial base.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 0, 1, 2, 1, 2, 0, 0, 2, 0, 1, 2, 1, 0, 2, 1, 1, 2, 2, 0, 2, 2, 1, 3, 0, 0, 3, 0, 1, 3, 1, 0, 3, 1, 1, 3, 2, 0, 3, 2, 1, 4, 0, 0, 4, 0, 1, 4, 1, 0, 4, 1, 1, 4, 2, 0, 4, 2, 1, 1, 0, 0, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 05 2014

Keywords

Comments

T(n,k) = A108731(n,k) for k=0..23.
a(n) = A108731(n) for n=0..63, when both tables are seen as flattened lists.
T(n,k) < 10 for k = 1..A235224(n) and n < 2100 = 10 * 7#.
When read from right to left, the row n gives exponents for successive primes 2, 3, 5, 7, 11, etc., in A276086(n). - Antti Karttunen, Mar 15 2021

Examples

			.        n | .. + _*7# + _*5# + _*3# + _*2# + _*1# | row(n)
. ---------+---------------------------------------+---------------------
.       10 | 1*6 + 2*2 + 0*1                       | [1,2,0], A276086(10) = 5 * 3^2
.      100 | 3*30 + 1*6 + 2*2 + 0*1                | [3,1,2,0]
.     1000 | 4*210 + 5*30 + 1*6 + 2*2n + 0*1       | [4,5,1,2,0]
.     2099 | 9*210 + 6*30 + 4*6 + 2*2 + 1*1        | [9,6,4,2,1]
.     2100 | 10*210 + 0*30 + 0*6 + 0*2 + 0*1       | [10,0,0,0,0]
.    10000 | 4*2310 + 3*210 + 4*30 + 1*6 + 2*2     | [4,3,4,1,2,0]
.   100000 | 3*30030+4*2310+3*210+1*30+1*6+2*2+0*1 | [3,4,3,1,1,2,0]
.  1000000 |                                       | [1,16,3,9,6,1,2,0]
. 10000000 |                                       | [1,0,10,0,0,0,1,2,0]
.  1000000 = 1*510510+16*30030+3*2310+9*210+6*30+1*6+2*2+0*1
. 10000000 = 1*9699690+0*510510+10*30030+0*2310+0*210+0*30+1*6+2*2+0*1
		

Crossrefs

Cf. A002110, A049345, A108731, A235224 (row lengths), A276086.

Programs

  • Haskell
    a235168 n k = a235168_row n !! k
    a235168_row 0 = [0]
    a235168_row n = t n $ reverse $ takeWhile (<= n) a002110_list
       where t 0 []     = []
             t x (b:bs) = x' : t m bs where (x', m) = divMod x b
    a235168_tabf = map a235168_row [0..]
  • Mathematica
    row[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; Reverse[s]]; row[0] = {0}; Array[row, 31, 0] // Flatten (* Amiram Eldar, Mar 11 2024 *)

A328403 a(n) = A276086(A276086(A276086(n))), where A276086(n) converts primorial base expansion of n into its prime product form.

Original entry on oeis.org

3, 6, 5, 18, 7, 43218, 125, 1050, 16807, 10, 161051, 1320550, 7105308412125, 7357350, 265837, 835182761270, 2292646180979, 146410, 258413198822535882125, 107718961350, 1045726245479028578048875581177070937, 32310040537956402036523898190, 528950766088569054716797662440479
Offset: 0

Views

Author

Antti Karttunen, Oct 15 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{b = MixedRadix[Reverse@ Prime@ Range@ 120], f}, f[n_] := Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ #, Reverse@ #} &@ IntegerDigits[n, b]; Array[Nest[f, #, 3] &, 23, 0]] (* Michael De Vlieger, Oct 17 2019 *)
  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328403(n) = A276086(A276086(A276086(n)));

Formula

A051903(a(n)) = A328394(n).
A061395(a(n)) = A328405(n).
A328114(a(n)) = A328398(n).
A235224(a(n)) = A328406(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).

A328406 The length of primorial base expansion (number of significant digits) of A276086(A276086(A276086(n))), where A276086(n) converts primorial base expansion of n into its prime product form.

Original entry on oeis.org

2, 3, 2, 3, 3, 7, 4, 5, 6, 3, 7, 8, 12, 8, 7, 12, 12, 7, 17, 11, 25, 21, 24, 84, 49, 63, 94, 67, 49, 97, 4, 6, 8, 9, 7, 10, 6, 14, 13, 4, 14, 11, 22, 22, 19, 20, 66, 16, 23, 40, 20, 19, 50, 105, 81, 87, 104, 71, 49, 81, 12, 10, 34, 21, 9, 16, 11, 23, 16, 17, 85, 49, 71, 27, 44, 21, 93, 87, 39, 58, 171, 50, 205, 112, 54, 78, 78
Offset: 0

Views

Author

Antti Karttunen, Oct 16 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{b = MixedRadix[Reverse@ Prime@ Range@ 120], f}, f[n_] := Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ #, Reverse@ #} &@ IntegerDigits[n, b]; Array[IntegerLength[Nest[f, #, 3], b] &, 87, 0]] (* Michael De Vlieger, Oct 17 2019 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328403(n) = A276086(A276086(A276086(n)));
    A328406(n) = A235224(A328403(n));

Formula

a(n) = A235224(A328403(n)) = A328404(A276087(n)) = A328405(A276086(n)).
For all n, A000040(a(n)) > A328398(n).

A328613 Starting with m = 1, p = 2 and x = n, iterate m -> m * p^valuation(x,p), x -> floor(x/p), p -> {the next prime after p}, until x is zero. Then a(n) = product of the values of m and p that were reached at the end of the iteration.

Original entry on oeis.org

2, 3, 10, 5, 20, 5, 42, 21, 56, 7, 14, 7, 84, 21, 14, 7, 112, 7, 126, 63, 28, 7, 14, 7, 168, 21, 14, 7, 28, 7, 330, 165, 1760, 55, 110, 55, 396, 99, 22, 11, 88, 11, 66, 33, 44, 11, 22, 11, 528, 33, 22, 11, 44, 11, 594, 297, 88, 11, 22, 11, 660, 165, 110, 55, 3520, 55, 66, 33, 44, 11, 22, 11, 792, 99, 22, 11, 44, 11, 66, 33, 176, 11
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2019

Keywords

Crossrefs

Programs

  • PARI
    A328613(n) = { my(m=1, p=2); while(n, m *= p^valuation(n,p); n = n\p; p = nextprime(1+p)); (m*p); };

Formula

a(n) = A000040(1+A235224(n)) * A328612(n).
For all n >= 0, A055396(a(n)) = A328570(n) and A020639(a(n)) = A326810(n).
For all n >= 1, A007814(a(n)) = A007814(n).
For all n >= 1, a(A143293(n-1)) = A000040(1+n).
Showing 1-10 of 20 results. Next