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

A250246 Permutation of natural numbers: a(1) = 1, a(n) = A246278(A055396(n), a(A078898(n))).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 22, 23, 24, 25, 26, 21, 28, 29, 30, 31, 32, 45, 34, 35, 36, 37, 38, 33, 40, 41, 54, 43, 44, 81, 46, 47, 48, 49, 50, 75, 52, 53, 42, 125, 56, 63, 58, 59, 60, 61, 62, 39, 64, 55, 90, 67, 68, 135, 70, 71, 72, 73, 74, 51, 76, 77, 66, 79, 80, 99, 82, 83
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2014

Keywords

Crossrefs

Inverse: A250245.
Other similar permutations: A250243, A250248, A250250, A163511, A252756.
Differs from the "vanilla version" A249818 for the first time at n=42, where a(42) = 54, while A249818(42) = 42.
Differs from A250250 for the first time at n=73, where a(73) = 73, while A250250(73) = 103.

Programs

  • PARI
    up_to = 16384;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
    A055396(n) = if(1==n,0,primepi(A020639(n)));
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A250246(n) = if(1==n,n,my(k = 2*A250246(A078898(n)), r = A055396(n)); if(1==r, k, while(r>1, k = A003961(k); r--); (k))); \\ Antti Karttunen, Apr 01 2018
    (Scheme, with memoizing-macro definec from Antti Karttunen's IntSeq-library, three alternative definitions)
    (definec (A250246 n) (cond ((<= n 1) n) (else (A246278bi (A055396 n) (A250246 (A078898 n)))))) ;; Code for A246278bi given in A246278
    (definec (A250246 n) (cond ((<= n 1) n) ((even? n) (* 2 (A250246 (/ n 2)))) (else (A003961 (A250246 (A250470 n))))))
    (define (A250246 n) (A163511 (A252756 n)))

Formula

a(1) = 1, a(n) = A246278(A055396(n), a(A078898(n))).
a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A003961(a(A250470(2n+1))). - Antti Karttunen, Jan 18 2015 - Instead of A250470, one may use A268674 in above formula. - Antti Karttunen, Apr 01 2018
As a composition of related permutations:
a(n) = A163511(A252756(n)).
Other identities. For all n >= 1:
a(n) = a(2n)/2. [The even bisection halved gives the sequence back.]
A020639(a(n)) = A020639(n) and A055396(a(n)) = A055396(n). [Preserves the smallest prime factor of n].
A001221(a(n)) = A302041(n).
A001222(a(n)) = A253557(n).
A008683(a(n)) = A302050(n).
A000005(a(n)) = A302051(n)
A010052(a(n)) = A302052(n), for n >= 1.
A056239(a(n)) = A302039(n).

A278523 a(n) = A046523(A249818(n)).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 12, 2, 6, 6, 16, 2, 12, 2, 12, 8, 6, 2, 24, 4, 6, 6, 12, 2, 30, 2, 32, 12, 6, 6, 36, 2, 6, 6, 24, 2, 30, 2, 12, 16, 6, 2, 48, 4, 12, 12, 12, 2, 24, 8, 24, 12, 6, 2, 60, 2, 6, 6, 64, 6, 30, 2, 12, 24, 30, 2, 72, 2, 6, 6, 12, 6, 30, 2, 48, 12, 6, 2, 60, 12, 6, 30, 24, 2, 60, 8, 12, 32, 6, 6, 96, 2, 12, 6, 36, 2, 30, 2, 24, 36, 6
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2016

Keywords

Crossrefs

Differs from related A278524 for the first time at n=42, where a(42)=30, while A278524(42)=24.

Programs

Formula

a(n) = A046523(A249818(n)).

A286553 a(n) = A046523(A252753(n)).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 2, 6, 6, 12, 4, 12, 6, 16, 2, 6, 8, 12, 6, 30, 6, 24, 4, 12, 6, 36, 6, 30, 12, 32, 2, 6, 6, 12, 6, 24, 6, 24, 6, 30, 6, 60, 6, 30, 6, 48, 4, 12, 12, 36, 8, 30, 30, 72, 6, 30, 6, 60, 6, 60, 6, 64, 2, 6, 12, 12, 6, 30, 16, 24, 6, 30, 6, 72, 6, 30, 12, 48, 6, 30, 12, 60, 6, 30, 6, 120, 6, 30, 30, 60, 12, 30, 6, 96, 4, 12
Offset: 0

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A046523(A252753(n)).
a(n) = A286557(A006068(n)).

A302046 A filter sequence analogous to A101296 for nonstandard factorization based on the sieve of Eratosthenes (A083221).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 31 2018

Keywords

Comments

Restricted growth sequence transform of A278524.
See A302042 for the description of the nonstandard factorization employed here.
For all i, j:
a(i) = a(j) => A253557(i) = A253557(j).
a(i) = a(j) => A302041(i) = A302041(j).
a(i) = a(j) => A302050(i) = A302050(j).
a(i) = a(j) => A302051(i) = A302051(j) => A302052(i) = A302052(j).

Crossrefs

Programs

  • PARI
    up_to = 32769;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A078898(n) = { if(n<=1,n, my(spf=A020639(n),k=1,m=n/spf); while(m>1,if(A020639(m)>=spf,k++); m--); (k)); };
    A001511(n) = 1+valuation(n,2);
    A302045(n) = A001511(A078898(n));
    A302044(n) = if(1==n,n,my(k=0); while((n%2), n = A268674(n); k++); n = (n/2^valuation(n, 2)); while(k>0, n = A250469(n); k--); (n));
    A302041(n) = if(1==n, 0,1+A302041(A302044(n)));
    Aux302046(n) = if(1==n,n, my(k=A302041(n), v = vector(k),i=1); while(n>1,v[i] = A302045(n); n = A302044(n); i++); vecsort(v));
    write_to_bfile(1,rgs_transform(vector(up_to,n,Aux302046(n))),"b302046.txt");
Showing 1-4 of 4 results.