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

A328471 Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(A328461(i)) = A046523(A328461(j)) for all i, j.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 3, 1, 2, 4, 5, 5, 2, 2, 5, 1, 2, 5, 5, 6, 5, 2, 5, 7, 2, 3, 8, 2, 5, 9, 5, 1, 2, 6, 9, 5, 5, 5, 5, 10, 2, 2, 10, 5, 2, 5, 11, 9, 2, 5, 9, 2, 9, 11, 9, 5, 2, 12, 10, 10, 2, 2, 5, 1, 5, 13, 12, 5, 9, 5, 14, 10, 5, 2, 10, 2, 5, 5, 12, 15, 2, 2, 10, 3, 10, 12, 9, 2, 2, 16, 5, 12, 10, 2, 5, 5, 2, 5, 5, 9, 5, 5, 10, 5, 2
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Comments

Restricted growth sequence transform of function f(n) = A046523(A276156(n)/A002110(A007814(n))).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328461(n) = (A276156(n)/A002110(valuation(n,2)));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v328471 = rgs_transform(vector(up_to, n, A046523(A328461(n))));
    A328471(n) = v328471[n];

A328472 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278226(A328461(i)) = A278226(A328461(j)) for all i, j.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 4, 1, 2, 5, 4, 1, 4, 6, 7, 1, 2, 8, 4, 2, 4, 9, 7, 2, 4, 10, 7, 11, 7, 12, 13, 1, 2, 14, 4, 15, 4, 16, 7, 17, 4, 18, 7, 19, 7, 20, 13, 3, 4, 21, 7, 22, 7, 23, 13, 24, 7, 25, 13, 22, 13, 26, 27, 1, 2, 28, 4, 29, 4, 30, 7, 20, 4, 31, 7, 32, 7, 33, 13, 34, 4, 35, 7, 36, 7, 37, 13, 38, 7, 39, 13, 36, 13, 40, 27, 22, 4
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Comments

Restricted growth sequence transform of function f(n) = A046523(A276086(A276156(n)/A002110(A007814(n)))).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328461(n) = (A276156(n)/A002110(valuation(n,2)));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A278226(n) = A046523(A276086(n));
    v328472 = rgs_transform(vector(up_to, n, A278226(A328461(n))));
    A328472(n) = v328472[n];

A276156 Numbers obtained by reinterpreting base-2 representation of n in primorial base: a(0) = 0, a(2n) = A276154(a(n)), a(2n+1) = 1 + A276154(a(n)).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 30, 31, 32, 33, 36, 37, 38, 39, 210, 211, 212, 213, 216, 217, 218, 219, 240, 241, 242, 243, 246, 247, 248, 249, 2310, 2311, 2312, 2313, 2316, 2317, 2318, 2319, 2340, 2341, 2342, 2343, 2346, 2347, 2348, 2349, 2520, 2521, 2522, 2523, 2526, 2527, 2528, 2529, 2550, 2551, 2552, 2553, 2556, 2557, 2558, 2559, 30030, 30031
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2016

Keywords

Comments

Numbers that are sums of distinct primorial numbers, A002110.
Numbers with no digits larger than one in primorial base, A049345.

Crossrefs

Complement of A177711.
Subsequences: A328233, A328832, A328462 (odd bisection).
Conjectured subsequences: A328110, A380527.
Fixed points of A328841, positions of zeros in A328828, A328842, and A329032, positions of ones in A328581, A328582, and A381032.
Positions of terms < 2 in A328114.
Indices where A327860 and A329029 coincide.
Cf. also table A328464 (and its rows).

Programs

  • Mathematica
    nn = 65; b = MixedRadix[Reverse@ Prime@ Range[IntegerLength[nn, 2] - 1]]; Table[FromDigits[IntegerDigits[n, 2], b], {n, 0, 65}] (* Version 10.2, or *)
    Table[Total[Times @@@ Transpose@ {Map[Times @@ # &, Prime@ Range@ Range[0, Length@ # - 1]], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 0, 65}] (* Michael De Vlieger, Aug 26 2016 *)
  • PARI
    A276156(n) = { my(s=0, p=1, r=1); while(n, if(n%2, s += r); n>>=1; p = nextprime(1+p); r *= p); (s); }; \\ Antti Karttunen, Feb 03 2022
  • Python
    from sympy import prime, primorial, primepi, factorint
    from operator import mul
    def a002110(n): return 1 if n<1 else primorial(n)
    def a276085(n):
        f=factorint(n)
        return sum([f[i]*a002110(primepi(i) - 1) for i in f])
    def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) # after Chai Wah Wu
    def a(n): return 0 if n==0 else a276085(a019565(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 23 2017
    

Formula

a(0) = 0, a(2n) = A276154(a(n)), a(2n+1) = 1+A276154(a(n)).
Other identities. For all n >= 0:
a(n) = A276085(A019565(n)).
A049345(a(n)) = A007088(n).
A257993(a(n)) = A001511(n).
A276084(a(n)) = A007814(n).
A051903(a(n)) = A351073(n).

A276154 a(n) = Shift primorial base representation (A049345) of n left by one digit (append one zero to the right, then convert back to decimal).

Original entry on oeis.org

0, 2, 6, 8, 12, 14, 30, 32, 36, 38, 42, 44, 60, 62, 66, 68, 72, 74, 90, 92, 96, 98, 102, 104, 120, 122, 126, 128, 132, 134, 210, 212, 216, 218, 222, 224, 240, 242, 246, 248, 252, 254, 270, 272, 276, 278, 282, 284, 300, 302, 306, 308, 312, 314, 330, 332, 336, 338, 342, 344, 420, 422, 426, 428, 432, 434, 450, 452, 456, 458, 462, 464, 480, 482, 486, 488
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2016

Keywords

Examples

			   n   A049345  with one zero           converted back
                appended to the right   to decimal = a(n)
---------------------------------------------------------
   0       0            00                     0
   1       1            10                     2
   2      10           100                     6
   3      11           110                     8
   4      20           200                    12
   5      21           210                    14
   6     100          1000                    30
   7     101          1010                    32
   8     110          1100                    36
   9     111          1110                    38
  10     120          1200                    42
  11     121          1210                    44
  12     200          2000                    60
  13     201          2010                    62
  14     210          2100                    66
  15     211          2110                    68
  16     220          2200                    72
		

Crossrefs

Complement: A276155.
Cf. A002110, A003961, A049345, A276085, A276086, A276151, A276152, A286629 [= a(A061720(n-1))], A324384 [= gcd(n, a(n))], A323879, A328770 (a subsequence).
Cf. also A276156, A328461, A328464.
Dispersion array and its transpose: A276943, A276945, with primorials divided out: A286623, A286625.
Analogous to A153880.

Programs

  • Mathematica
    nn = 75; b = MixedRadix[Reverse@ Prime@ NestWhileList[# + 1 &, 1, Times @@ Prime@ Range[#] <= nn &]]; Table[FromDigits[#, b] &@ Append[IntegerDigits[n, b], 0], {n, 0, nn}] (* Version 10.2, or *)
    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[Total[Times @@@ Transpose@ {Map[Times @@ # &, Prime@ Range@ Range[0, Length@ # - 1]], Reverse@ #}] &@ Append[f@ n, 0], {n, 0, 75}] (* Michael De Vlieger, Aug 26 2016 *)
  • PARI
    A276154(n) = A276085(A003961(A276086(n))); \\ Antti Karttunen, Mar 15 2021
    
  • PARI
    A276151(n) = { my(s=1); forprime(p=2, , if(n%p, return(n-s), s *= p)); };
    A276152(n) = { my(s=1); forprime(p=2, , if(n%p, return(s*p), s *= p)); };
    A276154(n) = if(!n,n,(A276152(n) + A276154(A276151(n)))); \\ Antti Karttunen, Mar 15 2021
    
  • Scheme
    (definec (A276154 n) (if (zero? n) n (+ (A276152 n) (A276154 (A276151 n)))))

Formula

a(0) = 0; for n >= 1, a(n) = A276152(n) + a(A276151(n)).
a(n) = A276085(A003961(A276086(n))). - Antti Karttunen, Mar 15 2021

A328464 Square array A(n,k) = A276156((2^(n-1)) * (2k-1)) / A002110(n-1), read by descending antidiagonals.

Original entry on oeis.org

1, 3, 1, 7, 4, 1, 9, 16, 6, 1, 31, 19, 36, 8, 1, 33, 106, 41, 78, 12, 1, 37, 109, 386, 85, 144, 14, 1, 39, 121, 391, 1002, 155, 222, 18, 1, 211, 124, 421, 1009, 2432, 235, 324, 20, 1, 213, 1156, 426, 1079, 2443, 4200, 341, 438, 24, 1, 217, 1159, 5006, 1086, 2575, 4213, 7430, 457, 668, 30, 1, 219, 1171, 5011, 17018, 2586, 4421, 7447, 12674, 691, 900, 32, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 16 2019

Keywords

Comments

Array is read by falling antidiagonals with n (row) and k (column) ranging as: (n,k) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ...
Row n contains all such sums of distinct primorials whose least significant summand is A002110(n-1), with each sum divided by that least significant primorial, which is also the largest primorial which divides that sum.

Examples

			Top left 9 X 11 corner of the array:
1: | 1,  3,   7,   9,    31,    33,    37,    39,    211,    213,    217
2: | 1,  4,  16,  19,   106,   109,   121,   124,   1156,   1159,   1171
3: | 1,  6,  36,  41,   386,   391,   421,   426,   5006,   5011,   5041
4: | 1,  8,  78,  85,  1002,  1009,  1079,  1086,  17018,  17025,  17095
5: | 1, 12, 144, 155,  2432,  2443,  2575,  2586,  46190,  46201,  46333
6: | 1, 14, 222, 235,  4200,  4213,  4421,  4434,  96578,  96591,  96799
7: | 1, 18, 324, 341,  7430,  7447,  7753,  7770, 215442, 215459, 215765
8: | 1, 20, 438, 457, 12674, 12693, 13111, 13130, 392864, 392883, 393301
9: | 1, 24, 668, 691, 20678, 20701, 21345, 21368, 765050, 765073, 765717
		

Crossrefs

Cf. A328463 (transpose).
Column 2: A008864.
Column 3: A023523 (after its initial term).
Column 4: A286624.
Cf. also arrays A276945, A286625.

Programs

  • PARI
    up_to = 105;
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328464sq(n,k) = (A276156((2^(n-1)) * (k+k-1)) / A002110(n-1));
    A328464list(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] = A328464sq(col,(a-(col-1))))); (v); };
    v328464 = A328464list(up_to);
    A328464(n) = v328464[n];

Formula

A(n,k) = A276156((2^(n-1)) * (2k-1)) / A002110(n-1).
a(n) = A328461(A135764(n)). [When all sequences are considered as one-dimensional]

A328462 Numbers obtained by reinterpreting base-2 representation of odd numbers in primorial base.

Original entry on oeis.org

1, 3, 7, 9, 31, 33, 37, 39, 211, 213, 217, 219, 241, 243, 247, 249, 2311, 2313, 2317, 2319, 2341, 2343, 2347, 2349, 2521, 2523, 2527, 2529, 2551, 2553, 2557, 2559, 30031, 30033, 30037, 30039, 30061, 30063, 30067, 30069, 30241, 30243, 30247, 30249, 30271, 30273, 30277, 30279, 32341, 32343, 32347, 32349, 32371, 32373
Offset: 1

Views

Author

Antti Karttunen, Oct 16 2019

Keywords

Crossrefs

Row 1 of A328464, odd bisection of A276156 and of A328461.
Cf. A143293 (subsequence).

Programs

  • PARI
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328462(n) = A276156(n+n-1);

A328474 Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(A276156(i)) = A046523(A276156(j)) for all i, j.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 5, 6, 2, 7, 3, 8, 2, 3, 3, 9, 2, 10, 3, 11, 3, 3, 3, 12, 2, 10, 7, 6, 3, 13, 3, 14, 2, 15, 10, 16, 3, 6, 3, 17, 2, 3, 6, 9, 2, 10, 18, 19, 2, 6, 10, 6, 10, 20, 10, 21, 2, 22, 6, 23, 2, 3, 3, 24, 3, 18, 16, 16, 10, 6, 9, 17, 3, 3, 6, 6, 3, 10, 16, 25, 2, 3, 6, 16, 6, 22, 10, 9, 2, 26, 3, 27, 6, 3, 3, 28, 2, 6, 3, 22, 3, 10, 6, 14, 2
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v328474 = rgs_transform(vector(up_to, n, A046523(A276156(n))));
    A328474(n) = v328474[n];

A328473 a(n) = A276156(n) - A002110(A007814(n)).

Original entry on oeis.org

0, 0, 2, 0, 6, 6, 8, 0, 30, 30, 32, 30, 36, 36, 38, 0, 210, 210, 212, 210, 216, 216, 218, 210, 240, 240, 242, 240, 246, 246, 248, 0, 2310, 2310, 2312, 2310, 2316, 2316, 2318, 2310, 2340, 2340, 2342, 2340, 2346, 2346, 2348, 2310, 2520, 2520, 2522, 2520, 2526, 2526, 2528, 2520, 2550, 2550, 2552, 2550, 2556, 2556, 2558, 0, 30030
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Comments

A276156(n) converts the binary expansion of n to a number whose primorial base representation has the same digits of 0's and 1's, thus each one of its terms is a unique sum of distinct primorial numbers. This sequence is otherwise similar, but the primorial number corresponding to the least significant 1-bit of n is dropped from the sum, so the sum is not unique anymore.

Crossrefs

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328473(n) = (A276156(n)-A002110(valuation(n,2)));

Formula

a(n) = A276156(A129760(n)).
a(n) = A276151(A276156(n)) = A276156(n) - A002110(A007814(n)).

A328466 Row 3 of A328464: a(n) = A276156(8n - 4) / 6.

Original entry on oeis.org

1, 6, 36, 41, 386, 391, 421, 426, 5006, 5011, 5041, 5046, 5391, 5396, 5426, 5431, 85086, 85091, 85121, 85126, 85471, 85476, 85506, 85511, 90091, 90096, 90126, 90131, 90476, 90481, 90511, 90516, 1616616, 1616621, 1616651, 1616656, 1617001, 1617006, 1617036, 1617041, 1621621, 1621626, 1621656, 1621661, 1622006, 1622011
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Crossrefs

Row 3 of A328464.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328466(n) = (A276156((8*n)-4) / 6);

Formula

a(n) = (1/6) * A276156(8*n - 4).

A328467 Row 4 of A328464: a(n) = A276156(16n - 8) / 30.

Original entry on oeis.org

1, 8, 78, 85, 1002, 1009, 1079, 1086, 17018, 17025, 17095, 17102, 18019, 18026, 18096, 18103, 323324, 323331, 323401, 323408, 324325, 324332, 324402, 324409, 340341, 340348, 340418, 340425, 341342, 341349, 341419, 341426, 7436430, 7436437, 7436507, 7436514, 7437431, 7437438, 7437508, 7437515, 7453447, 7453454, 7453524
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2019

Keywords

Crossrefs

Row 4 of A328464.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A276156(n) = { my(p=2,pr=1,s=0); while(n,if(n%2,s += pr); n >>= 1; pr *= p; p = nextprime(1+p)); (s); };
    A328467(n) = (A276156((16*n)-8) / 30);

Formula

a(n) = (1/30) * A276156(16*n - 8).
Showing 1-10 of 12 results. Next