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-8 of 8 results.

A347116 Even bisection of A347115.

Original entry on oeis.org

4, 10, 5, 30, 118, 12, 236, 90, 64, 240, 594, 36, 830, 480, -116, 270, 1428, 132, 1784, 720, 1076, 1200, 2622, 108, 144, 1680, 458, 1440, 4178, -228, 4772, 810, 1242, 2880, 2752, 396, 6810, 3600, 2318, 2160, 8364, 2160, 9200, 3600, 32, 5280, 10998, 324, 190, 300, 2508, 5040, 13994, 924, 5388, 4320, 3992, 8400, 17348, -684
Offset: 1

Views

Author

Antti Karttunen, Aug 20 2021

Keywords

Crossrefs

Cf. A347115.

Programs

Formula

a(n) = A347115(2*n).

A341515 The Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

1, 5, 2, 15, 3, 11, 5, 45, 4, 125, 7, 33, 11, 245, 6, 135, 13, 77, 17, 375, 10, 605, 19, 99, 9, 845, 8, 735, 23, 17, 29, 405, 14, 1445, 15, 231, 31, 1805, 22, 1125, 37, 1331, 41, 1815, 12, 2645, 43, 297, 25, 275, 26, 2535, 47, 539, 21, 2205, 34, 4205, 53, 51, 59, 4805, 20, 1215, 33, 1859, 61, 4335, 38, 3125, 67, 693
Offset: 1

Views

Author

Antti Karttunen, Feb 14 2021

Keywords

Comments

Collatz-conjecture can be formulated via this sequence by postulating that all iterations of a(n), starting from any n > 1, will eventually reach the cycle [2, 5, 3].

Crossrefs

Cf. A005940, A006370, A064989, A156552, A329603, A341510, A347115 (Möbius transform),
Sequences related to iterations of this sequence: A352890, A352891, A352892, A352893, A352894, A352896, A352897, A352898, A352899.
Cf. A341516 (a variant).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A329603(n) = A005940(2+(3*A156552(n)));
    A341515(n) = if(n%2, A064989(n), A329603(n));

Formula

If n is odd, then a(n) = A064989(n), otherwise a(n) = A329603(n) = A341510(n,2*n).
a(n) = A005940(1+A006370(A156552(n))).

A285702 a(n) = A000010(A064216(n)).

Original entry on oeis.org

1, 1, 2, 4, 2, 6, 10, 2, 12, 16, 4, 18, 6, 4, 22, 28, 6, 8, 30, 10, 36, 40, 4, 42, 20, 12, 46, 12, 16, 52, 58, 8, 20, 60, 18, 66, 70, 6, 24, 72, 8, 78, 24, 22, 82, 40, 28, 32, 88, 12, 96, 100, 8, 102, 106, 30, 108, 36, 20, 48, 42, 36, 18, 112, 40, 126, 64, 8, 130, 136, 42, 60, 44, 20, 138, 148, 24, 56, 150, 46, 72, 156, 12, 162, 110, 32, 166, 24, 52, 172, 178
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Odd bisection of the following sequences: A347115, A348045, A349127, A349128.

Programs

  • Mathematica
    Table[EulerPhi@ If[n == 1, 1, Apply[Times, FactorInteger[2 n - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e]], {n, 91}] (* Michael De Vlieger, Apr 26 2017 *)
  • Scheme
    (define (A285702 n) (A000010 (A064216 n)))

Formula

a(n) = A000010(A064216(n)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Product_{p prime} (p^3/((p+1)*(p^2-q(p)))) = 0.5366875995..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023

A348045 Möbius transform of A252463, where A252463 shifts the prime factorization of odd numbers one step towards smaller primes and divides even numbers by two.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 2, 2, 2, 6, 2, 10, 2, 2, 4, 12, 4, 16, 4, 4, 4, 18, 4, 6, 2, 4, 6, 22, 6, 28, 8, 6, 4, 8, 6, 30, 2, 10, 8, 36, 8, 40, 10, 4, 4, 42, 8, 20, 14, 12, 12, 46, 14, 12, 12, 16, 6, 52, 8, 58, 2, 8, 16, 20, 14, 60, 16, 18, 16, 66, 12, 70, 6, 6, 18, 24, 14, 72, 16, 8, 4, 78, 12, 24, 2, 22, 20, 82, 20
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2021

Keywords

Crossrefs

Cf. A008683, A064989, A252463, A285702 (odd bisection), A348046 (positions of 2's).
Cf. also A023022, A326305, A347115.

Programs

  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A348045(n) = sumdiv(n,d,moebius(n/d)*A252463(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A252463(d).

A349127 Möbius transform of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 4, 0, 2, 0, 6, 0, 10, 0, 2, 0, 12, 0, 16, 0, 4, 0, 18, 0, 6, 0, 4, 0, 22, 0, 28, 0, 6, 0, 8, 0, 30, 0, 10, 0, 36, 0, 40, 0, 4, 0, 42, 0, 20, 0, 12, 0, 46, 0, 12, 0, 16, 0, 52, 0, 58, 0, 8, 0, 20, 0, 60, 0, 18, 0, 66, 0, 70, 0, 6, 0, 24, 0, 72, 0, 8, 0, 78, 0, 24, 0, 22, 0, 82, 0, 40, 0, 28, 0, 32
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

The multiplicative definition of this sequence ("Möbius transform of prime shift towards lesser primes") differs from otherwise similarly defined A349128 (Euler phi applied to A064989) only in that here a(2^e) = 0, while A349128(2^e) = 1.
Compare the situation with A003961 ("prime shift towards larger primes"), where A003972(n) = A000010(A003961(n)) is also the Möbius transform of A003961.

Crossrefs

Agrees with A347115, A348045 and A349128 on odd numbers.
Cf. A000004, A285702 (even and odd bisection).

Programs

  • Mathematica
    f[p_, e_] := ((q = NextPrime[p, -1]) - 1)*q^(e - 1); a[1] = 1; a[n_] := If[EvenQ[n], 0, Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
  • PARI
    A349127(n) = if(!(n%2),0, my(f = factor(n), q); prod(i=1, #f~, q = precprime(f[i,1]-1); (q-1)*(q^(f[i,2]-1))));
    
  • PARI
    A064989(n) = { my(f = factor(n)); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };
    A349127(n) = if(n%2, eulerphi(A064989(n)), 0);
    
  • PARI
    A349127(n) = sumdiv(n,d,moebius(n/d)*A064989(d));

Formula

Multiplicative with a(2^e) = 0, and for odd primes p, a(p^e) = (q-1)*q^(e-1), where q = prevprime(p), where prevprime is A151799.
If n is odd, then a(n) = A000010(A064989(n)), and if n is even, then a(n) = 0.
a(n) = Sum_{d|n} A008683(d) * A064989(n/d).
For all n >= 1, a(2n-1) = A347115(2n-1) = A348045(2n-1) = A349128(2n-1) = A285702(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (16/Pi^4) / Product_{p prime > 2} (1+1/p-q(p)/p^2-q(p)/p^3) = 0.1341718..., where q(p) = prevprime(p) = A151799(p). - Amiram Eldar, Dec 24 2022

A347117 Möbius transform of A329603.

Original entry on oeis.org

2, 3, 6, 10, 16, 0, 48, 30, 12, 104, 96, 12, 240, 192, 8, 90, 336, 54, 576, 240, 16, 504, 720, 36, 24, 600, 40, 480, 1056, -122, 1680, 270, 96, 1104, 96, 132, 1920, 1224, 144, 720, 2736, 1064, 3360, 1200, 0, 1920, 3696, 108, 60, 126, 624, 1680, 4416, 422, 336, 1440, 768, 3144, 5616, -228, 6960, 3120, 416, 810, 624
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2021

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A329603(n) = A005940(2+(3*A156552(n)));
    A347117(n) = sumdiv(n,d,moebius(n/d)*A329603(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A329603(d).

A349128 a(n) = phi(A064989(n)), where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p, and phi is Euler totient function.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 4, 1, 2, 2, 6, 1, 10, 4, 2, 1, 12, 2, 16, 2, 4, 6, 18, 1, 6, 10, 4, 4, 22, 2, 28, 1, 6, 12, 8, 2, 30, 16, 10, 2, 36, 4, 40, 6, 4, 18, 42, 1, 20, 6, 12, 10, 46, 4, 12, 4, 16, 22, 52, 2, 58, 28, 8, 1, 20, 6, 60, 12, 18, 8, 66, 2, 70, 30, 6, 16, 24, 10, 72, 2, 8, 36, 78, 4, 24, 40, 22, 6, 82, 4, 40
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

See comments in A349127.

Crossrefs

Agrees with A347115, A348045 and A349127 on odd numbers.
Cf. A285702 (odd bisection).
Cf. A000010, A064989, A151799, A349122 (inverse Möbius transform).
Cf. also A003972.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, 1, Module[{q = NextPrime[p, -1]}, (q - 1)*q^(e - 1)]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 24 2022 *)
  • PARI
    A349128(n) = { my(f = factor(n), q); prod(i=1, #f~, if(2==f[i,1], 1, q = precprime(f[i,1]-1); (q-1)*(q^(f[i,2]-1)))); };

Formula

Multiplicative with a(2^e) = 1, and for odd primes p, a(p^e) = (q - 1)*q^(e-1), where q = prevprime(p), where prevprime is A151799.
For odd n, a(n) = A349127(n), for even n, a(n) = a(n/2).
For all n >= 1, a(n) = a(2*n) = a(A000265(n)).
For all n >= 1, a(A000040(1+n)) = A006093(n) = A000040(n)-1.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (64/(3*Pi^4)) / Product_{p prime > 2} (1+1/p-q(p)/p^2-q(p)/p^3) = 0.17889586..., where q(p) = prevprime(p) = A151799(p). - Amiram Eldar, Dec 24 2022

A347118 Möbius transform of A332449.

Original entry on oeis.org

1, 3, 8, 6, 24, 4, 48, 20, 12, 8, 120, 0, 168, 48, 48, 60, 288, 12, 360, 208, 168, 72, 528, 24, 30, 312, 84, 384, 840, -32, 960, 180, 312, 384, 552, 108, 1368, 792, 912, 480, 1680, -136, 1848, 1008, -54, 912, 2208, 72, 42, 18, 1224, 1200, 2808, -4, 1080, 960, 2232, 1272, 3480, -244, 3720, 2400, 792, 540, 2832, -120
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2021

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A332449(n) = A005940(1+(3*A156552(n)));
    A347118(n) = sumdiv(n,d,moebius(n/d)*A332449(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A332449(d).
Showing 1-8 of 8 results.