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.

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)).

A332815 a(n) = A108548(A005940(1+n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 25, 18, 27, 16, 13, 14, 21, 20, 35, 30, 45, 24, 49, 50, 75, 36, 125, 54, 81, 32, 11, 26, 39, 28, 65, 42, 63, 40, 91, 70, 105, 60, 175, 90, 135, 48, 169, 98, 147, 100, 245, 150, 225, 72, 343, 250, 375, 108, 625, 162, 243, 64, 17, 22, 33, 52, 55, 78, 117, 56, 77, 130, 195, 84
Offset: 0

Views

Author

Antti Karttunen, Feb 28 2020

Keywords

Comments

This is variant of Doudna-sequence, A005940 and thus can be represented as a binary tree. Each child to the left is obtained by applying A332818 to the parent, and each child to the right is obtained by doubling the parent:
1
|
...................2...................
3 4
5......../ \........6 9......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 15 12 25 18 27 16
13 14 21 20 35 30 45 24 49 50 75 36 125 54 81 32
etc.
Note the indexing: the sequence starts with a(0)=1, as is natural for sequences based on maps from base-2 expansion to prime factorization. This is
in contrast to A005940, which for historical reasons starts from offset 1.
For any n > 1, A332893(n) gives the value of the parent node. For any n >= 1, A332894(n) gives the distance to 1, and A332899(n) gives the number of odd numbers that occur (inclusively) on the path from 1 to n.

Crossrefs

Cf. A332816 (inverse permutation).
Cf. A108546 (the left edge of the tree from 2 downward).

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
    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); };
    A332815(n) = A108548(A005940(1+n));

Formula

a(n) = A108548(A005940(1+n)).

A332808 Fully multiplicative with a(p) = A332806(A000720(p)).

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, 71, 68, 87, 70, 79, 72, 67, 62, 75, 76, 91, 66, 89, 80, 81, 82, 101
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2020

Keywords

Crossrefs

Cf. A000720, A332806, A108549 (fixed points), A332818, A332819.
Inverse permutation is A108548, from which this differs for the first time at n=67, where a(67) = 71, while A108548(67) = 73.

Programs

  • PARI
    up_to = 10000;
    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); };

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.

A348746 Fully multiplicative with a(2) = 3, a(3) = 5, a(A002144(n)) = A002144(1+n) and a(A002145(1+n)) = a(A002145(1+n)) for all n >= 1, where A002144 and A002145 give the primes of the form 4k+1 and 4k+3 respectively.

Original entry on oeis.org

1, 3, 5, 9, 13, 15, 7, 27, 25, 39, 11, 45, 17, 21, 65, 81, 29, 75, 19, 117, 35, 33, 23, 135, 169, 51, 125, 63, 37, 195, 31, 243, 55, 87, 91, 225, 41, 57, 85, 351, 53, 105, 43, 99, 325, 69, 47, 405, 49, 507, 145, 153, 61, 375, 143, 189, 95, 111, 59, 585, 73, 93, 175, 729, 221, 165, 67, 261, 115, 273, 71, 675, 89, 123
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Comments

Permutation of odd numbers. Preserves the prime signature.

Crossrefs

Cf. A000720, A002144, A002145, A348744, A348747 (left inverse).
Cf. also A003961, A332818 for similar maps.

Programs

  • PARI
    A348746(n) = { my(f=factor(n)); for(k=1,#f~, if(2==f[k,1], f[k,1]=3, if(3==f[k,1], f[k,1]=5, if(1==(f[k,1]%4), for(i=1+primepi(f[k,1]),oo,if(1==(prime(i)%4), f[k,1]=prime(i); break)))))); factorback(f); };

Formula

Fully multiplicative with a(p) = A348744(A000720(p)), where A348744 is the lexicographically earliest bijection from primes to odd primes where each prime of the form 4k+1 is mapped to the next larger prime of the same form.

A354202 Fully multiplicative with a(p^e) = A354200(A000720(p))^e.

Original entry on oeis.org

1, 5, 7, 25, 13, 35, 11, 125, 49, 65, 19, 175, 17, 55, 91, 625, 29, 245, 23, 325, 77, 95, 31, 875, 169, 85, 343, 275, 37, 455, 43, 3125, 133, 145, 143, 1225, 41, 115, 119, 1625, 53, 385, 47, 475, 637, 155, 59, 4375, 121, 845, 203, 425, 61, 1715, 247, 1375, 161, 185, 67, 2275, 73, 215, 539, 15625, 221, 665, 71, 725
Offset: 1

Views

Author

Antti Karttunen, May 23 2022

Keywords

Comments

Permutation of A007310. Preserves the prime signature.

Crossrefs

Cf. A007310 (terms sorted into ascending order), A354200, A354203 (left inverse), A354204 (Möbius transform), A354205 (inverse Möbius transform).
Cf. also A003961, A108548, A267099, A332818, A348746, A354091 for similar constructions.

Programs

  • PARI
    A354200(n) = if(1==n,5,my(p=prime(n), m=p%4); forprime(q=1+p,,if(m==(q%4),return(q))));
    A354202(n) = { my(f=factor(n)); for(k=1,#f~,f[k,1] = A354200(primepi(f[k,1]))); factorback(f); };

A354091 Fully multiplicative prime shift where the primes of the form 3k+2 are replaced by the next larger such prime, and primes of the form 3k and 3k+1 stay as they are.

Original entry on oeis.org

1, 5, 3, 25, 11, 15, 7, 125, 9, 55, 17, 75, 13, 35, 33, 625, 23, 45, 19, 275, 21, 85, 29, 375, 121, 65, 27, 175, 41, 165, 31, 3125, 51, 115, 77, 225, 37, 95, 39, 1375, 47, 105, 43, 425, 99, 145, 53, 1875, 49, 605, 69, 325, 59, 135, 187, 875, 57, 205, 71, 825, 61, 155, 63, 15625, 143, 255, 67, 575, 87, 385, 83, 1125
Offset: 1

Views

Author

Antti Karttunen, May 17 2022

Keywords

Comments

Permutation of odd numbers. Preserves the prime signature.

Examples

			The primes in A003627 are replaced by the next prime in that sequence, as: 2 -> 5 -> 11 -> 17 -> 23 -> 29 -> 41 -> ..., while other kinds of primes (A002476) stay intact, thus for 60 = 2^2 * 3^1 * 5^1, we have a(60) = 5^2 * 3^1 * 11^1 = 825.
		

Crossrefs

Cf. A354092 (left inverse), A354093 (inverse Möbius transform), A354094 (Möbius transform), A354095, A354096.
Cf. also A003961, A332818, A348746 for similar constructions.

Programs

  • PARI
    A354091(n) = { my(f=factor(n)); for(k=1,#f~, if(2==(f[k,1]%3), for(i=1+primepi(f[k,1]),oo,if(2==(prime(i)%3), f[k,1]=prime(i); break)))); factorback(f); };

Formula

Fully multiplicative with a(A003627(n)) = A003627(1+n), a(A007645(n)) = A007645(n).
For all n >= 1, A354092(a(n)) = n.
For all n >= 1, A046523(a(n)) = A046523(n) and A074941(a(n)) = A074941(n).
Showing 1-8 of 8 results.