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

A328631 Square array where the row n lists all nonnegative numbers k for which A328578(k) = n, read by falling antidiagonals.

Original entry on oeis.org

1, 3, 0, 5, 12, 2, 7, 24, 6, 4, 9, 30, 18, 8, 10, 11, 42, 34, 16, 14, 20, 13, 54, 36, 32, 38, 22, 28, 15, 60, 48, 64, 58, 26, 50, 82, 17, 72, 66, 152, 62, 40, 52, 88, 116, 19, 84, 78, 184, 112, 44, 56, 106, 118, 148, 21, 90, 96, 210, 166, 46, 74, 110, 140, 178, 208, 23, 102, 108, 242, 176, 68, 76, 128, 142, 196, 412, 418
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

Array is read by descending antidiagonals with (n,k) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ... where A(n,k) is the k-th solution x to A328578(x) = n.

Examples

			The top left 12 X 12 corner of the array:
   n +------------------------------------------------------
   1 |   1,   3,   5,   7,   9,  11,  13,  15,  17,  19, ...
   2 |   0,  12,  24,  30,  42,  54,  60,  72,  84,  90, ...
   3 |   2,   6,  18,  34,  36,  48,  66,  78,  96, 108, ...
   4 |   4,   8,  16,  32,  64, 152, 184, 210, 242, 274, ...
   5 |  10,  14,  38,  58,  62, 112, 166, 176, 214, 218, ...
   6 |  20,  22,  26,  40,  44,  46,  68,  70,  86,  92, ...
   7 |  28,  50,  52,  56,  74,  76,  80,  94,  98, 100, ...
   8 |  82,  88, 106, 110, 128, 130, 134, 158, 182, 262, ...
   9 | 116, 118, 140, 142, 146, 160, 164, 170, 188, 190, ...
  10 | 148, 178, 196, 200, 202, 206, 328, 352, 374, 376, ...
  11 | 208, 412, 416, 562, 568, 586, 590, 592, 596, 614, ...
  12 | 418, 598, 626, 628, 778, 800, 802, 826, 830, 832, ...
		

Crossrefs

Programs

  • PARI
    up_to = 78;
    A257993(n) = { for(i=1,oo,if(n%prime(i),return(i))); }
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328578(n) = A257993(A276086(A276086(n)));
    memoA328631sq = Map();
    A328631sq(n, k) = { my(v=0); if(!mapisdefined(memoA328631sq,[n,k-1],&v),if(1==k, v=-1, v = A328631sq(n, k-1))); for(i=1+v,oo,if(A328578(i)==n,mapput(memoA328631sq,[n,k],i); return(i))); };
    A328631list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A328631sq(col,(a-(col-1))))); (v); };
    v328631 = A328631list(up_to);
    A328631(n) = v328631[n];

A328590 a(n) = A328578(n) - A257993(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 21 2019

Keywords

Crossrefs

Cf. A257993, A276086, A328578, A328585 (positions of zeros), A328587 (of negative terms), A328588 (of positive terms).
Cf. A328591 (even bisection).

Programs

Formula

a(n) = A328578(n) - A257993(n).

A328633 Numbers n for which A328578(n) = A257993(A276086(A276086(n))) = 3, where A276086 converts the primorial base expansion of n into its prime product form, and A257993 returns the index of the least prime not present in its argument.

Original entry on oeis.org

2, 6, 18, 34, 36, 48, 66, 78, 96, 108, 122, 126, 138, 154, 156, 168, 186, 198, 212, 222, 234, 244, 252, 264, 282, 294, 312, 324, 332, 342, 354, 364, 372, 384, 402, 414, 422, 426, 438, 454, 456, 468, 486, 498, 516, 528, 542, 546, 558, 574, 576, 588, 606, 618, 632, 642, 654, 664, 672, 684, 702, 714, 732, 744, 752, 762, 774, 784, 792, 804
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

Numbers n for which A276087(n) is a multiple of 6, but not of 5.
Question: Is the even bisection of A328316, starting from A328316(4) as: 6, 18, 43218, ..., a subsequence of this sequence? See also A328317.
Subsequence such that both k and A276087(k) are in this sequence starts as: 2, 6, 18, 34, 36, 48, 66, 154, 156, 186, 234, 244, 294, 312, 324, 354, 364, 384, 426, 438, 454, 456, 542, 546, 558, 588, 606, ...
When A276086 is applied to any number which is a multiple of 6, but not of 5 (and thus not a multiple of 30, implying that the number's primorial expansion ends with "x00", where x <> 0, and A257993(n) = 3), the original number will be converted to a number of the form 30k+5 or 30k+25 (A084967) whose primorial expansion ends either as "...021" or as "...401", with the least significant zero in position A328578(n), which is seen to be always either 3 or 2.

Examples

			294 = 7^2 * 3 * 2 has primorial base expansion (A049345) "12400", which, when converted to a prime product form (A276086) yields 11^1 * 7^2 * 5^4 * 3^0 * 2^0 = 336875. This in turn has primorial base representation [11,2,9,1,0,2,1], which when converted to prime product form gives 17^11 * 13^2 * 11^9 * 7^1 * 5^0 * 3^2 * 2^1 = 1720796647657111567992931482, which has the required property of being a multiple of 6 but not of 5, thus 294 is included in this sequence.
		

Crossrefs

Programs

A328634 Numbers n for which A328578(n) = A257993(A276086(A276086(n))) = 4.

Original entry on oeis.org

4, 8, 16, 32, 64, 152, 184, 210, 242, 274, 362, 394, 440, 448, 452, 484, 572, 604, 634, 638, 646, 662, 694, 782, 814, 872, 904, 992, 1024, 1070, 1078, 1082, 1114, 1202, 1234, 1264, 1268, 1276, 1292, 1324, 1412, 1444, 1470, 1502, 1534, 1622, 1654, 1700, 1708, 1712, 1744, 1832, 1864, 1894, 1898, 1906, 1922, 1954, 2042
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

Numbers n for which A276087(n) is a multiple of 30, but not of 7.

Crossrefs

Row 4 of A328631.

Programs

A328635 Numbers n for which A328578(n) = A257993(A276086(A276086(n))) = 5.

Original entry on oeis.org

10, 14, 38, 58, 62, 112, 166, 176, 214, 218, 226, 240, 360, 650, 658, 660, 780, 844, 848, 856, 1080, 1200, 1280, 1288, 1474, 1478, 1486, 1500, 1620, 1910, 1918, 1920, 2040, 2104, 2108, 2116, 2312, 2314, 2318, 2386, 2396, 2440, 2450, 2504, 2520, 2546, 2580, 2700, 2732, 2744, 2752, 2950, 3000, 3120, 3176, 3362, 3374, 3382, 3420
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

Numbers n for which A276087(n) is a multiple of 210, but not of 11.

Crossrefs

Row 5 of A328631.

Programs

A328636 Numbers n for which A328578(n) = A257993(A276086(A276086(n))) = 6.

Original entry on oeis.org

20, 22, 26, 40, 44, 46, 68, 70, 86, 92, 220, 224, 238, 248, 270, 272, 286, 356, 370, 424, 428, 500, 538, 544, 584, 622, 630, 682, 728, 766, 836, 896, 910, 934, 980, 1018, 1124, 1162, 1208, 1230, 1232, 1246, 1306, 1376, 1390, 1460, 1520, 1558, 1604, 1642, 1706, 1748, 1786, 1856, 1870, 1930, 2000, 2038, 2084, 2144, 2182, 2228, 2266
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

Numbers n for which A276087(n) is a multiple of 2310, but not of 13.

Crossrefs

Row 6 of A328631.

Programs

A328761 The least integer k >= 0 for which A328578(k) = A257993(A276086(A276086(k))) = n.

Original entry on oeis.org

1, 0, 2, 4, 10, 20, 28, 82, 116, 148, 208, 418, 838, 1048, 1466, 1858, 2276, 4612, 9028, 11546, 16162, 18478, 23098, 27688, 30028, 90086, 147838, 180178, 240232, 297988, 330328, 390358, 450238, 480478, 1021016, 2039728, 3033028, 3573566, 4594558, 5105098, 6606598, 7147136, 8168152, 8678668, 9699688, 29099062, 48498238, 58198138, 77597516, 96996896, 106696588, 126095968
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2019

Keywords

Comments

The sequence seems to be monotonic from the second term onward. If this holds, then this sequence (after the initial 1) gives also the positions of records in A328578. See also the scatterplot of A328578.

Crossrefs

Column 1 of A328631.

Programs

  • PARI
    A257993(n) = { for(i=1,oo,if(n%prime(i),return(i))); }
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328578(n) = A257993(A276086(A276086(n)));
    A328761(n) = for(k=0,oo,if(A328578(k)==n,return(k)));
    
  • PARI
    A328761list(up_to) = { my(v=vector(up_to), k); for(n=0,oo,k=A328578(n); if(k>#v, return(v)); if(!v[k],v[k] = n; print("Found ",k, " at n=",n)); if(k>=#v,return(v))); };
    v328761 = A328761list(52);
    A328761(n) = if(2==n,0,v328761[n]);

A328591 Even bisection of A328590: a(n) = A328578(2n) - A257993(2n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 21 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A328590(2n) = A328578(2n) - A257993(2n).

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

A328570 Index of the least significant zero digit in the primorial base expansion of n, when the rightmost digit is in the position 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 20 2019

Keywords

Comments

Index of the least prime not dividing A276086(n), where A276086 converts the primorial base expansion of n into its prime product form.
Starting from x = n, repeatedly divide x by prime(1) (discarding the remainder), and set x to the integer quotient floor(x/prime(1)), then divide x with prime(2) (again discarding the remainder, and setting x to the integer quotient), etc., stopping as soon one of the primes is a divisor of the previous integer quotient (leaving zero remainder). a(n) is then the index of that prime, equal to 1 + the number of iterations done.

Examples

			For n = 2, we divide it with A000040(1) = 2, and it leaves zero remainder, so we have finished on the first round (needing no actual iterations), and thus a(2) = 1. Note that 2 in primorial base (A049345) is written as "10", and indeed the first zero from the right occurs at the position 1.
For n = 5, we first divide 5 with prime(1) = 2, and discarding the remainder, we are left with floor(5/2) = 2. Then we divide that 2 with prime(2) = 3, leaving floor(2/3) = 0 and remainder 2. And finally we divide 0 with prime(3) = 5, and that doesn't leave any remainder, thus we are finished on the third round, and a(5) = 3. Note that 5 in primorial base is written as "21", and allowing here a leading zero, written as "021", we see that it is in this case the least significant zero occurring at position 3 from the right.
For n = 43, we first divide it with prime(1) = 2, leaving a remainder 1 and integer quotient 21. Then we divide 21 with prime(2) = 3, which doesn't leave any remainder, thus we are finished on the second round, and a(43) = 2. Note that 43 is written as "1201" in primorial base, with the least significant zero occurring in the position 2.
		

Crossrefs

Programs

  • PARI
    A328570(n) = { my(i=1, p=2); while(n && (n%p), i++; n = n\p; p = nextprime(1+p)); (i); };

Formula

a(n) = A000720(A326810(n)) = A257993(A276086(n)) = A055396(A276087(n)).
For all n >= 0, A002110(a(n)) = A328580(n), a(A276086(n)) = A328578(n).
For all odd n, A000040(a(n)) = A326810(n) > A276088(n).
For all n >= 0, A276086(n)/A002110(a(n)-1) = A328475(n) and A276086(n)-A002110(a(n)-1) = A328476(n).
Showing 1-10 of 24 results. Next