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.

Previous Showing 21-30 of 480 results. Next

A350073 a(n) = A064989(sigma(n)), 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, 2, 1, 5, 2, 2, 1, 6, 11, 4, 2, 5, 5, 2, 2, 29, 4, 22, 3, 10, 1, 4, 2, 6, 29, 10, 3, 5, 6, 4, 1, 20, 2, 8, 2, 55, 17, 6, 5, 12, 10, 2, 7, 10, 22, 4, 2, 29, 34, 58, 4, 25, 8, 6, 4, 6, 3, 12, 6, 10, 29, 2, 11, 113, 10, 4, 13, 20, 2, 4, 4, 66, 31, 34, 29, 15, 2, 10, 3, 58, 49, 20, 10, 5, 8, 14, 6, 12, 12, 44, 5, 10
Offset: 1

Views

Author

Antti Karttunen, Dec 12 2021

Keywords

Crossrefs

Cf. also A326042, A350072.

Programs

  • Mathematica
    f[2, e_] := 1; f[p_, e_] := NextPrime[p, -1]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[DivisorSigma[1, n]]; Array[a, 100] (* Amiram Eldar, Dec 12 2021 *)
  • PARI
    A064989(n) = { my(f = factor(n)); for (i=1, #f~, f[i,1] = if(2==f[i, 1],1,precprime(f[i, 1]-1))); factorback(f); };
    A350073(n) = A064989(sigma(n));

Formula

Multiplicative with a(p^e) = A064989(1 + p + p^2 + ... + p^e).
a(n) = A064989(A000203(n)) = A064989(A161942(n)).

A252735 a(1) = 0; for n > 1: a(2n) = a(n), a(2n+1) = 1 + a(A064989(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 21 2014

Keywords

Comments

Consider the binary tree illustrated in A005940: If we start from any n, computing successive iterations of A252463 until 1 is reached (i.e., we are traversing level by level towards the root of the tree, starting from that vertex of the tree where n is located at), a(n) gives the number of odd numbers > 1 encountered on the path (i.e., excluding the final 1 from the count but including the starting n if it was odd).

Crossrefs

Essentially one less than A061395.
Cf. also A246369.

Programs

Formula

a(1) = 0; for n > 1: a(2n) = a(n), a(2n+1) = 1 + a(A064989(n)).
a(n) = A080791(A156552(n)). [Number of nonleading 0-bits in A156552(n).]
Other identities:
For all n >= 2:
a(n) = A061395(n) - 1.
a(n) = A000120(A243071(n)) - 1. [One less than the binary weight of A243071(n).]
a(n) = A252464(n) - A252736(n) - 1.

A266401 Self-inverse permutation of natural numbers: a(n) = A064989(A263273(A003961(n))).

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 17, 8, 13, 6, 11, 20, 9, 34, 71, 16, 7, 26, 19, 12, 23, 22, 21, 40, 41, 18, 227, 68, 31, 142, 29, 32, 53, 14, 67, 52, 61, 38, 107, 24, 25, 46, 59, 44, 65, 42, 73, 80, 49, 82, 197, 36, 33, 454, 55, 136, 137, 62, 43, 284, 37, 58, 571, 64, 45, 106, 35, 28, 89, 134, 15, 104, 47
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Comments

Shift primes in the prime factorization of n one step towards larger primes (A003961), then apply the bijective base-3 reverse (A263273) to the resulting odd number, which yields another (or same) odd number, then shift primes in the prime factorization of that second odd number one step back towards smaller primes (A064989).

Crossrefs

Cf. A265369, A265904, A266190, A266403 (other conjugates or similar sequences derived from A263273).

Programs

  • Mathematica
    f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; g[p_?PrimeQ] := g[p] = Prime[PrimePi@ p + 1]; g[1] = 1; g[n_] := g[n] = Times @@ (g[First@ #]^Last@ # &) /@ FactorInteger@ n; h[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Table[h@ f@ g@ n, {n, 82}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 and A263273 *)
  • PARI
    A030102(n) = { my(r=[n%3]); while(0M. F. Hasler's Nov 04 2011 code in A030102.
    A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary.
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    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)};
    A266401 = n -> A064989(A263273(A003961(n)));
    for(n=1, 6560, write("b266401.txt", n, " ", A266401(n)));
    
  • Scheme
    (define (A266401 n) (A064989 (A263273 (A003961 n))))

Formula

a(n) = A064989(A263273(A003961(n))).
As a composition of related permutations:
a(n) = A064216(A264996(A048673(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A330749 a(n) = gcd(n, A064989(n)), where A064989 is fully multiplicative with a(2) = 1 and a(prime(k)) = prime(k-1) for odd primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 5, 4, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 4, 1, 1, 3, 1, 7, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 15
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2019

Keywords

Crossrefs

Programs

  • PARI
    A330749(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)); gcd(n,factorback(f)); };

Formula

a(n) = gcd(n, A064989(n)).
a(n) = n / A319626(n).
a(n) = A064989(A322361(n)).

A332819 a(n) = A108548(A064989(A332808(n))).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 13, 2, 7, 5, 6, 1, 11, 4, 17, 3, 10, 13, 29, 2, 9, 7, 8, 5, 19, 6, 37, 1, 26, 11, 15, 4, 23, 17, 14, 3, 31, 10, 41, 13, 12, 29, 53, 2, 25, 9, 22, 7, 43, 8, 39, 5, 34, 19, 61, 6, 47, 37, 20, 1, 21, 26, 73, 11, 58, 15, 89, 4, 59, 23, 18, 17, 65, 14, 97, 3, 16, 31, 101, 10, 33, 41, 38, 13, 67, 12, 35, 29
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2020

Keywords

Crossrefs

A left inverse of A332818.

Programs

Formula

Fully multiplicative with a(2) = 1, a(3) = 2, a(A002144(n)) = A002145(n), and a(A002145(1+n)) = A002144(n) for all n >= 1.
a(n) = A108548(A064989(A332808(n))).
a(A332818(n)) = n.

A348748 Odd numbers k for which A064989(sigma(k)) < A064989(k), where A064989 shifts the prime factorization one step towards lower primes, and sigma is the sum of divisors function.

Original entry on oeis.org

3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 33, 35, 37, 39, 41, 43, 47, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Comments

Sequence obtained when A003961 is applied to A348738 and the terms are sorted into ascending order.
The first squares in this sequence are: 169, 361, 961, 1369, 1849, 2209, 2809, 3721, 4489, 5329, 6241, 6889, ...

Crossrefs

Cf. A000203, A003961, A064989, A326042, A348738, A348749, A348938 (terms of A228058 that occur here).
Cf. also A348741, A348753.

Programs

  • Mathematica
    f[2, e_] := 1; f[p_, e_] := NextPrime[p, -1]^e; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[1, 200, 2], s[DivisorSigma[1, #]] < s[#] &] (* Amiram Eldar, Nov 04 2021 *)
  • 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)};
    isA348748(n) = ((n%2)&&(A064989(sigma(n)) < A064989(n)));

A349125 Dirichlet inverse 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, -1, -2, 0, -3, 2, -5, 0, 0, 3, -7, 0, -11, 5, 6, 0, -13, 0, -17, 0, 10, 7, -19, 0, 0, 11, 0, 0, -23, -6, -29, 0, 14, 13, 15, 0, -31, 17, 22, 0, -37, -10, -41, 0, 0, 19, -43, 0, 0, 0, 26, 0, -47, 0, 21, 0, 34, 23, -53, 0, -59, 29, 0, 0, 33, -14, -61, 0, 38, -15, -67, 0, -71, 31, 0, 0, 35, -22, -73, 0, 0, 37, -79
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, If[p == 2, -1, -NextPrime[p, -1]], 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
  • 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); };
    A349125(n) = (moebius(n)*A064989(n));
    
  • PARI
    A349125(n) = { my(f = factor(n)); prod(i=1, #f~, if(1
    				
  • Python
    from sympy import prevprime, factorint, prod
    def f(p, e):
        return 0 if e > 1 else -1 if p == 2 else -prevprime(p)
    def a(n):
        return prod(f(p, e) for p, e in factorint(n).items()) # Sebastian Karlsson, Nov 13 2021

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A064989(n/d) * a(d).
a(n) = A349126(n) - A064989(n).
Multiplicative with a(p^e) = 0 if e > 1, -1 if p = 2 and -prevprime(p) otherwise. - Sebastian Karlsson, Nov 13 2021
a(n) = A008683(n) * A064989(n). [Because A064989 is fully multiplicative. See "Properties" section in the Wikipedia article]

A246376 Permutation of natural numbers: a(1) = 1, a(2n) = 2 * a(n), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 13, 12, 21, 18, 11, 16, 25, 14, 33, 20, 15, 26, 29, 24, 17, 42, 19, 36, 53, 22, 73, 32, 43, 50, 37, 28, 45, 66, 31, 40, 57, 30, 81, 52, 27, 58, 61, 48, 49, 34, 35, 84, 117, 38, 41, 72, 87, 106, 169, 44, 213, 146, 67, 64, 65, 86, 89, 100, 91, 74, 173, 56, 149, 90, 51, 132, 101, 62, 113, 80, 23
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Crossrefs

Inverse: A246375.
Similar or related permutations: A005940, A005941, A064216, A243071, A245605, A246377, A246380.

Formula

a(1) = 1, a(2n) = 2 * a(n), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
As a composition of related permutations:
a(n) = A246377(A246380(n)).
Other identities. For all n >= 1 the following holds:
A000035(a(n)) = A000035(n). [Like A005940 & A005941, this also preserves the parity].

A252736 a(1) = a(2) = 0; for n > 2: a(2n) = 1 + a(n), a(2n+1) = a(A064989(2n+1)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 21 2014

Keywords

Comments

Consider the binary tree illustrated in A005940: If we start from any n, computing successive iterations of A252463 until 1 is reached (i.e., we are traversing level by level towards the root of the tree, starting from that vertex of the tree where n is located), a(n) gives the number of even numbers > 2 encountered on the path (i.e., excluding the 2 from the count but including the starting n if it was even).
The number of pairs in any factorization tree of n. For example, a possible factorization tree of 12 is 12 -> (4*3) -> (2*2)*3. There are 2 pairs in this factor tree: (4*3) and (2*2). Thus, a(12) - 1 = 3 - 1 = 2. - Melvin Peralta, Aug 29 2016

Crossrefs

Essentially one less than A001222.
Cf. also A246370.

Programs

  • Mathematica
    a[1] = a[2] = 0; a[n_] := a[n] = If[EvenQ@ n, 1 + a[n/2], a[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n]]; Array[a, 120] (* Michael De Vlieger, Aug 30 2016 *)

Formula

a(1) = a(2) = 0; for n > 2: a(2n) = 1 + a(n), a(2n+1) = a(A064989(2n+1)).
a(n) = A080791(A243071(n)). [Number of nonleading 0-bits in A243071(n).]
Other identities. For all n >= 2:
a(n) = A000120(A156552(n)) - 1. [One less than the binary weight of A156552(n).]
a(n) = A252464(n) - A252735(n) - 1.
a(n) = A001222(n) - 1.

A279339 a(1) = 1; for n > 1, if n is even, a(n) = A055938(a(n/2)), otherwise a(n) = A005187(a(A064989(n))).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 7, 12, 8, 9, 11, 13, 19, 14, 10, 27, 35, 17, 67, 20, 16, 24, 131, 28, 15, 40, 22, 29, 259, 21, 515, 58, 25, 72, 18, 36, 1027, 136, 46, 43, 2051, 33, 4099, 51, 23, 264, 8195, 59, 26, 30, 78, 83, 16387, 45, 31, 60, 142, 520, 32771, 44, 65539, 1032, 38, 121, 47, 52, 131075, 147, 270, 37, 262147, 75, 524291, 2056, 32, 275, 34, 93
Offset: 1

Views

Author

Antti Karttunen, Dec 10 2016

Keywords

Comments

A more recursed variant of A279337.

Crossrefs

Inverse: A279338.
Related or similar permutations: A156552, A243071, A279337, A279342, A279344.

Programs

Formula

a(1) = 1; for n > 1, if n is even, a(n) = A055938(a(n/2)), otherwise a(n) = A005187(a(A064989(n))).
As a composition of other permutations:
a(n) = A279342(A243071(n)).
a(n) = A279344(A156552(n)).
Previous Showing 21-30 of 480 results. Next