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 10 results.

A108548 Fully multiplicative with a(prime(j)) = A108546(j), where A108546 is the lexicographically earliest permutation of primes such that after 2 the forms 4*k+1 and 4*k+3 alternate, and prime(j) is the j-th prime in A000040.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14, 15, 16, 17, 18, 19, 20, 21, 26, 29, 24, 25, 22, 27, 28, 23, 30, 37, 32, 39, 34, 35, 36, 31, 38, 33, 40, 41, 42, 43, 52, 45, 58, 53, 48, 49, 50, 51, 44, 47, 54, 65, 56, 57, 46, 61, 60, 59, 74, 63, 64, 55, 78, 73, 68, 87, 70, 67, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Comments

Multiplicative with a(2^e) = 2^e, else if p is the m-th prime then a(p^e) = q^e where q is the m/2-th prime of the form 4*k + 3 (A002145) for even m and a(p^e) = r^e where r is the (m-1)/2-th prime of the form 4*k + 1 (A002144) for odd m. - David A. Corneth, Apr 25 2022
Permutation of the natural numbers with fixed points A108549: a(A108549(n)) = A108549(n).

Crossrefs

Cf. A002144, A002145, A049084, A108546, A108549 (fixed points), A332808 (inverse permutation).
Cf. also A332815, A332817 (this permutation applied to Doudna tree and its mirror image), also A332818, A332819.
Cf. also A267099, A332212 and A348746 for other similar mappings.

Programs

  • Mathematica
    terms = 72;
    A111745 = Module[{prs = Prime[Range[2 terms]], m3, m1, min},
         m3 = Select[prs, Mod[#, 4] == 3&];
         m1 = Select[prs, Mod[#, 4] == 1&];
         min = Min[Length[m1], Length[m3]];
         Riffle[Take[m3, min], Take[m1, min]]];
    A108546[n_] := If[n == 1, 2, A111745[[n - 1]]];
    A049084[n_] := PrimePi[n]*Boole[PrimeQ[n]];
    a[n_] := If[n == 1, 1, Module[{p, e}, Product[{p, e} = pe; A108546[A049084[p]]^e, {pe, FactorInteger[n]}]]];
    Array[a, terms] (* Jean-François Alcover, Nov 19 2021, using Harvey P. Dale's code for A111745 *)
  • PARI
    up_to = 26927; \\ One of the prime fixed points.
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n];
    A108548(n) = { my(f=factor(n)); f[,1] = apply(A108546,apply(primepi,f[,1])); factorback(f); }; \\ Antti Karttunen, Apr 25 2022

Extensions

Name edited by Antti Karttunen, Apr 25 2022

A332817 a(n) = A108548(A163511(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 27, 18, 25, 12, 15, 10, 7, 32, 81, 54, 125, 36, 75, 50, 49, 24, 45, 30, 35, 20, 21, 14, 13, 64, 243, 162, 625, 108, 375, 250, 343, 72, 225, 150, 245, 100, 147, 98, 169, 48, 135, 90, 175, 60, 105, 70, 91, 40, 63, 42, 65, 28, 39, 26, 11, 128, 729, 486, 3125, 324, 1875, 1250, 2401, 216, 1125, 750, 1715, 500
Offset: 0

Views

Author

Antti Karttunen, Mar 05 2020

Keywords

Comments

This irregular table can be represented as a binary tree. Each child to the left is obtained by doubling the parent, and each child to the right is obtained by applying A332818 to the parent:
1
|
...................2...................
4 3
8......../ \........9 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 27 18 25 12 15 10 7
32 81 54 125 36 75 50 49 24 45 30 35 20 21 14 13
etc.
This is the mirror image of the tree in A332815.

Crossrefs

Cf. A332811 (inverse permutation).
Cf. A054429, A108548, A163511, A332815 (mirror image).
Cf. A108546 (the right edge of the tree from 2 downward).
Cf. also A332214.

Programs

  • PARI
    up_to = 26927;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A054429(n) = ((3<<#binary(n\2))-n-1); \\ From A054429
    A163511(n) = if(!n,1,A005940(1+A054429(n)));
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n]; \\ Antti Karttunen, Mar 05 2020
    A108548(n) = { my(f=factor(n)); f[,1] = apply(A108546,apply(primepi,f[,1])); factorback(f); };
    A332817(n) = A108548(A163511(n));

Formula

a(n) = A108548(A163511(n)).
For n >= 1, a(n) = A332815(A054429(n)).

A332893 a(1) = 1, a(2n) = n, a(2n+1) = A332819(2n+1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2020

Keywords

Comments

For any node n >= 2 in binary trees like A332815, a(n) gives the parent node of n.

Crossrefs

Cf. also A252463.

Programs

Formula

a(1) = 1, after which a(n) = n/2 for even n, and a(n) = A332819(n) for odd n.

A332896 a(1) = 0, and for n > 1, a(n) = 2*a(A332893(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 5, 0, 0, 4, 21, 4, 10, 10, 5, 0, 42, 0, 85, 8, 8, 42, 341, 8, 0, 20, 1, 20, 170, 10, 1365, 0, 40, 84, 11, 0, 682, 170, 21, 16, 2730, 16, 5461, 84, 8, 682, 21845, 16, 0, 0, 85, 40, 10922, 2, 43, 40, 168, 340, 87381, 20, 43690, 2730, 17, 0, 16, 80, 349525, 168, 680, 22, 1398101, 0, 174762, 1364, 1, 340, 32, 42, 5592405, 32, 0, 5460
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

Base-2 expansion of a(n) encodes the steps where numbers of the form 4k+3 are encountered when map x -> A332893(x) is iterated down to 1, starting from x=n. See the binary tree illustrated in A332815.

Crossrefs

Programs

Formula

a(1) = 0, and for n > 1, a(n) = 2*a(A332893(n)) + [n == 3 (mod 4)].
Other identities. For n >= 1:
a(2n) = 2*a(n).
a(A108546(n)) = A000975(n-1).

A332898 a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

Starting from x=n, iterate the map x -> A332893(x) which divides even numbers by 2, and for odd n, changes every 4k+1 prime in the prime factorization to 4k+3 prime and vice versa (except 3 --> 2), like in A332819. a(n) counts the numbers of the form 4k+3 encountered until 1 has been reached. The count includes also n itself if it is of the form 4k+3 (A004767).
In other words, locate the node which contains n in binary tree A332815 and traverse from that node towards the root, counting all numbers of the form 4k+3 that occur on the path.

Crossrefs

Cf. A028982 (positions of zeros).
Cf. also A292377.

Programs

Formula

a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].
a(n) = A000120(A332896(n)).

A332899 a(1) = 0, and for n > 2, a(n) = a(A332893(n)) + A000035(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

a(n) tells how many odd numbers are encountered when map x -> A332893(x) is used to traverse from n to 1, the root of the binary tree A332815. This count includes both the starting n itself if it is odd, but excludes 1 where the iteration ends.
a(n) also gives the index of the largest prime factor (A061395) in A332808(n), which is the inverse permutation of A108548 (see also A108546).

Crossrefs

Cf. A000079 (after its initial term, gives the positions of 1's).

Programs

Formula

a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + A000035(n).
a(n) = A000120(A332811(n)).
a(n) = A061395(A332808(n)).
a(n) = A332897(n) + A332898(n).
a(n) <= A332894(n).
For all n > 1, a(n) = 1 + A080791(A332816(n)).

A332816 a(n) = A156552(A332808(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 6, 9, 32, 11, 16, 17, 10, 15, 64, 13, 128, 19, 18, 65, 512, 23, 12, 33, 14, 35, 256, 21, 2048, 31, 66, 129, 20, 27, 1024, 257, 34, 39, 4096, 37, 8192, 131, 22, 1025, 32768, 47, 24, 25, 130, 67, 16384, 29, 68, 71, 258, 513, 131072, 43, 65536, 4097, 38, 63, 36, 133, 524288, 259, 1026, 41, 2097152, 55, 262144, 2049, 26, 515
Offset: 1

Views

Author

Antti Karttunen, Feb 28 2020

Keywords

Crossrefs

Cf. A332815 (inverse permutation).

Programs

  • PARI
    up_to = 26927;
    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}; \\ From A156552
    A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q,u); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3);  for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
    v332806 = A332806list(up_to);
    A332806(n) = v332806[n];
    A332808(n) = { my(f=factor(n)); f[,1] = apply(A332806,apply(primepi,f[,1])); factorback(f); };
    A332816(n) = A156552(A332808(n));

Formula

a(n) = A156552(A332808(n)).
For n > 1, A070939(a(n)) = A332894(n).
For n >= 1: (Start)
A080791(a(n)) = A332899(n)-1.
Among many identities given in A156552 that apply here as well we have for example the following ones:
A000120(a(n)) = A001222(n).
A069010(a(n)) = A001221(n).
A106737(a(n)) = A000005(n).
(End)

A332894 a(1) = 0, a(2n) = 1 + a(n), a(2n+1) = 1 + a(A332819(2n+1)); also binary width of terms of A332816.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

a(n) tells how many iterations of A332893 are needed before 1 is reached, i.e., the distance of n from 1 in binary trees like A332815.
Each n > 0 occurs 2^(n-1) times in total.

Crossrefs

Programs

Formula

a(n) = A252464(A332808(n)).
a(1) = 0, and for n > 1, a(n) = 1 + a(A332893(n)).
For n >= 1, a(A108546(n)) = n; for all n >= 0, a(2^n) = n.
For n > 1: (Start)
a(n) = 1 + a(n/2) if n is even, and a(n) = 1 + a(A332819(n)), if n is odd.
a(n) = A070939(A332816(n)).
a(n) >= A332899(n).
(End)

A332895 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A332893(n)) + [n == 1 (mod 4)].

Original entry on oeis.org

0, 1, 2, 2, 5, 4, 10, 4, 5, 10, 42, 8, 21, 20, 8, 8, 85, 10, 170, 20, 21, 84, 682, 16, 11, 42, 8, 40, 341, 16, 2730, 16, 85, 170, 16, 20, 1365, 340, 40, 40, 5461, 42, 10922, 168, 17, 1364, 43690, 32, 23, 22, 168, 84, 21845, 16, 80, 80, 341, 682, 174762, 32, 87381, 5460, 40, 32, 43, 170, 699050, 340, 1365, 32, 2796202
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Crossrefs

Programs

Formula

a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A332893(n)) + [n == 1 (mod 4)].
For n > 1, a(2n) = 2*a(n).
For n >= 1, a(A108546(n)) = A000975(n); A000120(a(n)) = A332897(n).

A332901 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(A332896(i)) = A278222(A332896(j)) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

Restricted growth sequence transform of A278222(A332896(n)).
This is a variant of A292583: Instead of runs of numbers of the form 4k+3 encountered on trajectories of the standard Doudna-tree (A005940), this relates to the corresponding trajectories in A332815-tree. See comments in A292583.
For all i, j:
a(i) = a(j) => A053866(i) = A053866(j),
a(i) = a(j) => A332898(i) = A332898(j).

Crossrefs

Cf. A028982 (positions of ones).
Cf. also A292583.

Programs

Showing 1-10 of 10 results.