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

A352892 Next even term in the trajectory of map x -> A341515(x), when starting from x=n; a(1) = 1. Here A341515 is the Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

1, 2, 2, 6, 2, 2, 2, 12, 4, 8, 2, 14, 2, 18, 6, 24, 2, 6, 2, 54, 10, 50, 2, 28, 4, 98, 8, 150, 2, 2, 2, 48, 14, 242, 6, 70, 2, 338, 22, 108, 2, 8, 2, 294, 12, 578, 2, 56, 4, 20, 26, 726, 2, 12, 10, 300, 34, 722, 2, 26, 2, 1058, 20, 96, 14, 18, 2, 1014, 38, 32, 2, 140, 2, 1682, 18, 1734, 6, 50, 2, 216, 16, 1922, 2, 686
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Crossrefs

Coincides with A353268 on even n, and with A348717 on odd n.

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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
    A352892(n) = A348717(A341515(n));
    
  • PARI
    A352892(n) = if(1==n, n, n = A341515(n); while(n%2, n = A341515(n)); (n)); \\ A slower alternative.

Formula

a(n) = A348717(A341515(n)).
For all n >= 1, a(2n) = A353268(2n), a(2n-1) = A348717(2n-1).
a(p) = 2 for all primes p.
For n > 1, a(n) = A005940(1+A139391(A156552(n))).

A347115 Möbius transform of A341515.

Original entry on oeis.org

1, 4, 1, 10, 2, 5, 4, 30, 2, 118, 6, 12, 10, 236, 2, 90, 12, 64, 16, 240, 4, 594, 18, 36, 6, 830, 4, 480, 22, -116, 28, 270, 6, 1428, 8, 132, 30, 1784, 10, 720, 36, 1076, 40, 1200, 4, 2622, 42, 108, 20, 144, 12, 1680, 46, 458, 12, 1440, 16, 4178, 52, -228, 58, 4772, 8, 810, 20, 1242, 60, 2880, 18, 2752, 66, 396
Offset: 1

Views

Author

Antti Karttunen, Aug 20 2021

Keywords

Crossrefs

Cf. A285702 (odd bisection), A347116 (even bisection).

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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A347115(n) = sumdiv(n,d,moebius(n/d)*A341515(d));

Formula

a(n) = A008683(n/d) * A341515(d).

A352890 Number of iterations of map x -> A341515(x) needed to reach x <= 2 when starting from x=n, or -1 if such number is never reached. Here A341515 is the Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

0, 0, 1, 7, 2, 5, 3, 16, 8, 19, 4, 14, 5, 12, 6, 17, 6, 9, 7, 20, 20, 26, 8, 15, 9, 27, 17, 13, 9, 7, 10, 106, 13, 121, 7, 111, 11, 122, 27, 34, 12, 21, 13, 27, 15, 35, 14, 104, 10, 23, 28, 28, 15, 18, 21, 102, 122, 36, 16, 29, 17, 156, 21, 107, 14, 14, 18, 122, 123, 109, 19, 112, 20, 113, 10, 123, 8, 28, 21, 35
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Comments

The unbroken ray in the scatter plot corresponds to primes.

Crossrefs

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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A352890(n) = { my(k=0); while(n>2, n = A341515(n); k++); (k); };

Formula

If n <= 2, a(n) = 0, otherwise a(n) = 1 + a(A341515(n)).
For n > 1, a(n) = A006577(A156552(n)).
For n >= 1, a(A000040(n)) = n-1.
For n >= 1, a(n) >= A352891(n).
For n >= 1, a(n) >= A352893(n).

A352891 Number of iterations of map x -> A341515(x) needed to reach x < n when starting from x=n, or 0 if such number is never reached. Here A341515 is the Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

0, 0, 1, 6, 1, 3, 1, 11, 1, 3, 1, 9, 1, 7, 1, 11, 1, 3, 1, 6, 1, 6, 1, 9, 1, 11, 1, 7, 1, 1, 1, 91, 1, 106, 1, 5, 1, 16, 1, 14, 1, 4, 1, 7, 1, 20, 1, 89, 1, 3, 1, 7, 1, 3, 1, 87, 1, 21, 1, 1, 1, 50, 1, 92, 1, 5, 1, 18, 1, 3, 1, 8, 1, 98, 1, 14, 1, 5, 1, 14, 1, 34, 1, 6, 1, 35, 1, 12, 1, 2, 1, 21, 1, 71, 1, 90, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Comments

This is one possible analog for A102419 ("Dropping time" sequence) when computed for A341515. See also A352894.

Crossrefs

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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A352891(n) = if(n<=2, 0, my(k=0,x=n); while(x>=n, x = A341515(x); k++); (k));

Formula

For n >= 1, a(2n+1) = 1.
For n >= 1, A352894(n) <= a(n) <= A352890(n).

A329603 a(n) = A005940(1+(1+(3*A156552(n)))) = (1/2) * A005940(1+(3*A156552(2*n))).

Original entry on oeis.org

2, 5, 8, 15, 18, 11, 50, 45, 20, 125, 98, 33, 242, 245, 32, 135, 338, 77, 578, 375, 72, 605, 722, 99, 42, 845, 60, 735, 1058, 17, 1682, 405, 200, 1445, 162, 231, 1922, 1805, 392, 1125, 2738, 1331, 3362, 1815, 44, 2645, 3698, 297, 110, 275, 968, 2535, 4418, 539, 450, 2205, 1352, 4205, 5618, 51, 6962, 4805, 500, 1215, 882, 1859, 7442, 4335, 2312
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2019

Keywords

Comments

Function n -> 3n+1 (A016777) conjugated by A156552. - Antti Karttunen, Aug 21 2021

Crossrefs

Permutation of A329604.
A skewed diagonal of A341510.

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), 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) = ((1/2)*A005940(1+(3*A156552(2*n))));
    
  • Python
    from math import prod
    from itertools import accumulate
    from collections import Counter
    from sympy import prime, primepi, factorint
    def A329603(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(1+3*sum((1<Chai Wah Wu, Mar 11 2023

Formula

a(n) = (1/2) * A005940(1+(3*A156552(2*n))).
From Antti Karttunen, Feb 14 2021: (Start)
A156552(2*a(n)) = 3*A156552(2*n) = 3*(1+2*A156552(n)) = 3 + 6*A156552(n).
a(n) = A341510(n,2n) = A005940(1+A156552(n)+A156552(2n)) = A005940(1+(1+(3*A156552(n)))).
a(n) = A005940(1+A016777(A156552(n))).
For all n >= 1, A329903(a(n)) = A332814(a(n)) = A332823(A332461(a(n))) = 1.
For all n >= 1, A341354(a(n)) > 0.
For all n >= 1, A000035(a(n)) = 1 - A000035(n). [Flips the parity of n]
(End)
a(n) = A332449(2*n)/2, a(n) = Sum_{d|n} A347117(d). - Antti Karttunen, Aug 21 2021

Extensions

New primary definition added by Antti Karttunen, Feb 14 2021

A341510 Symmetric square array A(n,k) = A005940(1+A156552(n)+A156552(k)), read by antidiagonals starting with A(1,1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 13 2021

Keywords

Comments

Considered as a binary operation on the positive integers, A(x, y) returns the term of the Doudna-sequence from the position that is the sum of the positions of x and y in the same sequence. (This is based on giving the Doudna-sequence an offset of 0, rather than 1 as used in A005940.) - Peter Munn, Feb 14 2021

Examples

			The top left 16x16 corner of the array:
   1,  2,  3,  4,  5,  6,  7,  8,  9, 10,  11,  12,  13,  14,  15, 16,
   2,  3,  4,  5,  6,  9, 10,  7,  8, 15,  14,  25,  22,  21,  12, 11,
   3,  4,  5,  6,  9,  8, 15, 10,  7, 12,  21,  18,  33,  20,  25, 14,
   4,  5,  6,  9,  8,  7, 12, 15, 10, 25,  20,  27,  28,  35,  18, 21,
   5,  6,  9,  8,  7, 10, 25, 12, 15, 18,  35,  16,  55,  30,  27, 20,
   6,  9,  8,  7, 10, 15, 18, 25, 12, 27,  30,  11,  42,  45,  16, 35,
   7, 10, 15, 12, 25, 18, 11, 16, 27, 14,  49,  20,  77,  50,  21, 24,
   8,  7, 10, 15, 12, 25, 16, 27, 18, 11,  24,  21,  40,  49,  14, 45,
   9,  8,  7, 10, 15, 12, 27, 18, 25, 16,  45,  14,  63,  24,  11, 30,
  10, 15, 12, 25, 18, 27, 14, 11, 16, 21,  50,  35,  70,  75,  20, 49,
  11, 14, 21, 20, 35, 30, 49, 24, 45, 50,  13,  36, 121,  22,  75, 32,
  12, 25, 18, 27, 16, 11, 20, 21, 14, 35,  36,  45,  60, 125,  30, 75,
  13, 22, 33, 28, 55, 42, 77, 40, 63, 70, 121,  60,  17,  98, 105, 48,
  14, 21, 20, 35, 30, 45, 50, 49, 24, 75,  22, 125,  98,  33,  36, 13,
  15, 12, 25, 18, 27, 16, 21, 14, 11, 20,  75,  30, 105,  36,  35, 50,
  16, 11, 14, 21, 20, 35, 24, 45, 30, 49,  32,  75,  48,  13,  50, 81,
		

Crossrefs

Cf. A341511 (the lower triangular section).
Cf. A003961 (main diagonal), A329603 (skewed diagonal).
Cf. A297165 (row 2 and column 2, when started from its term a(1)).

Programs

  • PARI
    up_to = 105;
    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), 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 };
    A341510sq(n,k) = A005940(1+A156552(n)+A156552(k));
    A341510list(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] = A341510sq(col,(a-(col-1))))); (v); };
    v341510 = A341510list(up_to);
    A341510(n) = v341510[n];

Formula

A(n, k) = A(k, n) = A005940(1 + A156552(n) + A156552(k)).
A(n, n) = A003961(n).
A(n, 2*n) = A(2*n, n) = A329603(n).
A(n, 2) = A(2, n) = A297165(n).

A352893 Number of iterations of map x -> A352892(x) needed to reach x <= 2 when starting from x=n, or -1 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 1, 5, 3, 6, 1, 4, 1, 3, 2, 5, 1, 2, 1, 6, 7, 8, 1, 4, 3, 8, 6, 3, 1, 1, 1, 39, 4, 44, 2, 41, 1, 44, 9, 11, 1, 6, 1, 8, 5, 10, 1, 38, 3, 7, 9, 8, 1, 5, 7, 37, 45, 10, 1, 9, 1, 56, 7, 39, 4, 3, 1, 44, 45, 40, 1, 41, 1, 39, 3, 44, 2, 8, 1, 11, 6, 15, 1, 3, 9, 15, 11, 13, 1, 4, 7, 10, 11, 32, 9, 38
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

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); };
    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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
    A352892(n) = A348717(A341515(n));
    A352893(n) = { my(k=0); while(n>2, n = A352892(n); k++); (k); };
    
  • PARI
    \\ Much faster than above program:
    A139391(n) = my(x = if(n%2, 3*n+1, n/2)); x/2^valuation(x, 2); \\ From A139391
    A286380(n) = { my(k=0); while(n>1, n = A139391(n); k++); (k); };
    A352893(n) = if(1==n,0,A286380(A156552(n)));

Formula

If n <= 2, a(n) = 0, otherwise a(n) = 1 + a(A352892(n)).
For n > 1, a(n) = A286380(A156552(n)).
a(p) = 1 for all odd primes p.
For n >= 1, A352894(n) <= a(n) <= A352890(n).

A352894 Number of iterations of map x -> A352892(x) needed to reach x < n when starting from x=n, or 0 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 1, 4, 1, 1, 1, 3, 1, 2, 1, 4, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 35, 1, 40, 1, 2, 1, 5, 1, 5, 1, 1, 1, 2, 1, 6, 1, 34, 1, 1, 1, 2, 1, 1, 1, 33, 1, 6, 1, 1, 1, 17, 1, 35, 1, 1, 1, 6, 1, 1, 1, 3, 1, 35, 1, 4, 1, 1, 1, 5, 1, 10, 1, 3, 1, 10, 1, 4, 1, 1, 1, 6, 1, 24, 1, 34, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Antti Karttunen, Apr 08 2022

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); };
    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), 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)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
    A352892(n) = A348717(A341515(n));
    A352894(n) = if(n<=2, 0, my(k=0,x=n); while(x>=n, x = A352892(x); k++); (k));

Formula

a(2n+1) = 1 for n >= 1.
For n >= 1, a(n) <= A352891(n).
For n >= 1, a(n) <= A352893(n).

A352896 Maximum value of bigomega (A001222) computed for the terms x after the initial n, when map x -> A352892(x) is iterated starting from x=n down to the first x <= 2, or -1 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Comments

Equally, maximum value of bigomega (A001222) computed for the terms x after the initial n, when map x -> A341515(x) is iterated starting from x=n.

Crossrefs

Programs

  • PARI
    A352896(n) = if(n<=2,n-1, my(m=0); while(n>2, n = A352892(n); m = max(m,bigomega(n))); (m)); \\ Needs also code from A352892.
    
  • PARI
    A352896(n) = if(n<=2,n-1,my(m=0); while(n>2, n = A341515(n); m = max(m,bigomega(n))); (m)); \\ Slower, but equivalent.
    
  • PARI
    \\ Faster:
    A139391(n) = my(x = if(n%2, 3*n+1, n/2)); x/2^valuation(x, 2); \\ From A139391
    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 };
    A352895(n) = { my(mw=1); while(n>1, n = A139391(n); mw = max(hammingweight(n),mw)); (mw); };
    A352896(n) = if(1==n,0,A352895(A156552(n)));

Formula

a(n) = A352897(A341515(n)) = A352897(A352892(n)).
For n > 1, a(n) = A352895(A156552(n)).

A352897 Maximum value of bigomega (A001222) computed for all the terms x (including the starting term x=n), when map x -> A352892(x) is iterated down to the first x <= 2, or -1 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 08 2022

Keywords

Comments

Equally, maximum value of bigomega (A001222) computed for all the terms x (including the starting term x=n), when map x -> A341515(x) is iterated starting from x=n.

Crossrefs

Programs

  • PARI
    A352897(n) = { my(m=bigomega(n)); while(n>2, m = max(m,bigomega(n)); n = A352892(n)); (m); }; \\ Uses the code from A352892.
    
  • PARI
    A352897(n) = { my(m=bigomega(n)); while(n>2, m = max(m,bigomega(n)); n = A341515(n)); (m); }; \\ Slightly slower.
    
  • PARI
    A139391(n) = my(x = if(n%2, 3*n+1, n/2)); x/2^valuation(x, 2); \\ From A139391
    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 };
    A333860(n) = { my(mw=1); while(n>1, mw = max(hammingweight(n),mw); n = A139391(n)); (mw); };
    A352897(n) = if(1==n,0,A333860(A156552(n)));

Formula

a(n) = max(A001222(n), A352896(n)).
For n > 1, a(n) = A333860(A156552(n)).
Showing 1-10 of 13 results. Next