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 31-40 of 43 results. Next

A305418 Permutation of nonnegative integers: a(1) = 0, a(2n) = 1 + 2*a(n), a(2n+1) = 2*a(A305422(2n+1)).

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 4, 7, 10, 13, 8, 11, 16, 9, 14, 15, 30, 21, 32, 27, 12, 17, 34, 23, 64, 33, 22, 19, 18, 29, 128, 31, 258, 61, 36, 43, 256, 65, 38, 55, 512, 25, 130, 35, 46, 69, 1024, 47, 20, 129, 62, 67, 66, 45, 2048, 39, 70, 37, 4096, 59, 8192, 257, 26, 63, 54, 517, 16384, 123, 24, 73, 16386, 87, 32768, 513, 142, 131, 8194, 77, 132, 111, 48, 1025, 42, 51
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2018

Keywords

Comments

This is GF(2)[X] analog of A156552. Note the indexing: the domain starts from 1, while the range includes also zero.

Crossrefs

Cf. A305417 (inverse).
Cf. A305422.

Programs

  • PARI
    A091225(n) = polisirreducible(Pol(binary(n))*Mod(1, 2));
    A305419(n) = if(n<3,1, my(k=n-1); while(k>1 && !A091225(k),k--); (k));
    A305422(n) = { my(f = subst(lift(factor(Pol(binary(n))*Mod(1, 2))),x,2)); for(i=1,#f~,f[i,1] = Pol(binary(A305419(f[i,1])))); fromdigits(Vec(factorback(f))%2,2); };
    A305418(n) = if(1==n,(n-1),if(!(n%2),1+(2*(A305418(n/2))),2*A305418(A305422(n))));

Formula

a(1) = 0, a(2n) = 1 + 2*a(n), a(2n+1) = 2*a(A305422(2n+1)).
a(n) = A054429(A305428(n)).
For all n >= 1:
A000120(a(n)) = A091222(n).
A069010(a(n)) = A091221(n).
A106737(a(n)) = A091220(n).
A132971(a(n)) = A091219(n).
A085357(a(n)) = A304109(n).

A322822 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(2) = -1, f(n) = 0 if n is a Fermi-Dirac prime (A050376) > 2, and f(n) = A300840(n) for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 29 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A322823(i) = A322823(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A322822aux(n) = if((2==n),-1,if(A302777(n),0,A300840(n)));
    v322822 = rgs_transform(vector(up_to,n,A322822aux(n)));
    A322822(n) = v322822[n];

A304537 Suspected divisor-or-multiple permutation of squarefree numbers: a(n) = A019565(A304533(n)).

Original entry on oeis.org

1, 2, 6, 3, 15, 5, 65, 13, 26, 182, 7, 14, 42, 21, 105, 35, 455, 91, 910, 10, 30, 210, 70, 2730, 39, 78, 546, 273, 1365, 195, 7995, 41, 82, 246, 123, 615, 205, 2665, 533, 1066, 11726, 11, 22, 66, 33, 165, 55, 715, 143, 286, 2002, 77, 154, 462, 231, 1155, 385, 5005, 1001, 10010, 110, 330, 2310, 770, 30030, 429, 858, 6006, 3003, 15015, 2145, 87945, 451, 902
Offset: 0

Views

Author

Antti Karttunen, May 15 2018

Keywords

Comments

Each a(n) is always either a divisor or a multiple of a(n+1).
Consider A052330. Imagine that it is an automatic piano that "plays sequences" when an appropriate punched "tape" is fed to it (as its input), i.e., when it is composed from the right with an appropriate sequence p, as A019565(p(n)). The 1-bits in the binary expansion of each p(n) are the "holes" in the tape, and they determine which "tunes" are present on beat n. The "tunes" are actually "Fermi-Dirac primes" (A050376) that are multiplied together.
If the tape is constructed in such a way that between the successive beats (when moving from p(n) to p(n+1)), either a subset of 0-bits are toggled on (changed to 1's), or a subset of 1-bits are toggled off (changed to 0's), but no both kind of changes occur simultaneously, then when fed as an input to this piano, the resulting sequence "s" (the output) is guaranteed to satisfy the condition that s(n+1) is either a multiple or a divisor of s(n). Furthermore, if the given sequence p is itself a permutation of natural numbers, then also the produced sequence is. For example, Gray code A003188 and its inverse A006068 are such sequences, and when given as an "input tape" for A052330, they produce permutations A207901 and A302783.
There is a simpler instrument, called "squarefree piano" (A019565), with which it is possible to produce similar divisor-or-multiple sequences, but that contain only squarefree numbers. Given A003188 or A006068 as an input tape for it produces correspondingly sequences A302033 and A284003.
This sequence is obtained by playing "squarefree piano" with the same tape which yields A304531 when "Fermi-Dirac piano" is played with it. However, in this case the sequence A304531 is produced by a greedy algorithm, and thus its tape (A304533) is actually a back-formation, obtained from the "music" (A304531) by applying "tape-recorder" (A052331) to it. Note that this in not a subsequence of A304531, as the terms occur in different order than the squarefree terms of A304531.
See also Peter Munn's Apr 11 2018 message on SeqFan-mailing list.

Crossrefs

Programs

Formula

a(n) = A019565(A304533(n)) = A019565(A052331(A304531(1+n))).

A323082 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -(n mod 2) if n is a prime, and f(n) = A300840(n) for any other number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

For all i, j: A323074(i) = A323074(j) => a(i) = a(j).
Like the related A322822 also this filter sequence satisfies the following two implications, for all i, j >= 1:
a(i) = a(j) => A322356(i) = A322356(j),
a(i) = a(j) => A290105(i) = A290105(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&A302777(n/d), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A323082aux(n) = if(isprime(n),-(n%2),A300840(n));
    v323082 = rgs_transform(vector(up_to,n,A323082aux(n)));
    A323082(n) = v323082[n];

A160102 Multiplicative function, one-to-one and onto the squarefree numbers.

Original entry on oeis.org

1, 2, 3, 5, 7, 6, 11, 10, 13, 14, 17, 15, 19, 22, 21, 23, 29, 26, 31, 35, 33, 34, 37, 30, 41, 38, 39, 55, 43, 42, 47, 46, 51, 58, 77, 65, 53, 62, 57, 70, 59, 66, 61, 85, 91, 74, 67, 69, 71, 82, 87, 95, 73, 78, 119, 110, 93, 86, 79, 105, 83, 94, 143, 115, 133, 102, 89, 145
Offset: 1

Views

Author

Keywords

Comments

Multiplicative with a(A050376(m)) = Prime(m) = A000040(m). If k = 2^{i_1} + ... + 2^{i_j} is the binary representation of k, a(p^k) = a(p^2^{i_1}) * ... * a(p^2^{i_j}). [edited by Peter Munn, Jan 07 2020]
Equivalently, a(A050376(m)) = A000040(m); a(A059897(n,k)) = A059897(a(n), a(k)). - Peter Munn, Dec 30 2019

Crossrefs

Sequences used in definitions of this sequence: A000040, A019565, A050376, A052331, A059897.
Cf. A005117 (range of values), A052330.

Programs

  • PARI
    al(n)={local(v,k,fm,m,p);
    v=vector(n);v[1]=1;p=1;
    for(k=2,n,fm=factor(k);
    if(matsize(fm)[1]>1,m=fm[1,1]^fm[1,2];v[k]=v[m]*v[k/m],
    m=2^valuation(fm[1,2],2);
    if(m==fm[1,2],p=nextprime(p+1);v[k]=p,
    m=fm[1,1]^m;v[k]=v[m]*v[k/m])));
    v}

Formula

From Peter Munn, Dec 30 2019: (Start)
a(n) = A019565(A052331(n)).
a(A052330(k)) = A019565(k).
(End)

A298480 Lexicographically earliest sequence of distinct positive terms such that the Fermi-Dirac factorizations of two consecutive terms differ by exactly one factor.

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 8, 24, 120, 30, 10, 5, 15, 60, 20, 40, 280, 56, 14, 7, 21, 42, 168, 84, 28, 140, 35, 70, 210, 105, 420, 840, 7560, 1080, 216, 54, 18, 9, 27, 108, 36, 72, 360, 90, 45, 135, 270, 1890, 378, 126, 63, 189, 756, 252, 504, 1512, 16632, 1848, 264
Offset: 1

Views

Author

Rémy Sigrist, Jul 21 2018

Keywords

Comments

For Fermi-Dirac representation of n see A182979. - N. J. A. Sloane, Jul 21 2018
For any n > 0, either a(n)/a(n+1) or a(n+1)/a(n) belongs to A050376.
This sequence has similarities with A282291; in both sequences, each pair of consecutive terms contains a term that divides the other.

Examples

			The first terms, alongside a(n+1)/a(n), are:
  n   a(n)  a(n+1)/a(n)
  --  ----  -----------
   1     1        2
   2     2        3
   3     6      1/2
   4     3        2^2
   5    12      1/3
   6     4        2
   7     8        3
   8    24        5
   9   120      1/2^2
  10    30      1/3
  11    10      1/2
  12     5        3
  13    15        2^2
  14    60      1/3
  15    20        2
  16    40        7
  17   280      1/5
  18    56      1/2^2
  19    14      1/2
  20     7        3
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A000120(A052331(a(n)) XOR A052331(a(n+1))) = 1 for any n > 0 (where XOR denotes the bitwise XOR operator).
Apparently, a(n) = A052330(A163252(n-1)) for any n > 0.

A302782 Inverse permutation to A302781.

Original entry on oeis.org

0, 1, 3, 15, 5, 2, 21, 14, 63, 6, 255, 12, 85, 20, 4, 341, 1023, 62, 4095, 10, 22, 254, 1365, 13, 5461, 86, 60, 16, 16383, 7, 65535, 340, 252, 1022, 26, 48, 21845, 4094, 84, 9, 87381, 23, 262143, 240, 58, 1366, 1048575, 342, 349525, 5460, 1020, 90, 1398101, 61, 250, 19, 4092, 16382, 4194303, 11, 16777215, 65534, 42
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2018

Keywords

Crossrefs

Cf. A302781 (inverse).

Programs

  • PARI
    up_to = 8192;
    v050376 = vector(up_to);
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ From A006068
    A057300(n) = { my(t=1,s=0); while(n>0, if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); };
    A163355(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); if(((1==d)&&!(i%2))||((2==d)&&(i%2)), f+A163355(A057300(r)), if(3==d,f+f+A163355(A057300(r)), (3*f)+A163355(f-1-r))));
    A302845(n) = A163355(A006068(A006068(n)));
    A302782(n) = A302845(A052331(n));

Formula

a(n) = A302845(A052331(n)).

A322823 a(n) = 0 if n is 1 or a Fermi-Dirac prime (A050376), otherwise a(n) = 1 + a(A300840(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 29 2018

Keywords

Comments

For n > 1, a(n) gives the number of edges needed to traverse from n to reach the leftmost branch (where the terms of A050376 are located) in the binary tree illustrated in A052330.

Crossrefs

Programs

  • PARI
    up_to = 10000;
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A322823(n) = if((1==n)||(1==A302777(n)),0,1+A322823(A300840(n)));

Formula

a(1) = 0; for n > 1, if A302777(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(A300840(n)).

A064358 Inverse of sequence A052330 considered as a permutation of the natural numbers.

Original entry on oeis.org

1, 2, 3, 5, 9, 4, 17, 6, 33, 10, 65, 7, 129, 18, 11, 257, 513, 34, 1025, 13, 19, 66, 2049, 8, 4097, 130, 35, 21, 8193, 12, 16385, 258, 67, 514, 25, 37, 32769, 1026, 131, 14, 65537, 20, 131073, 69, 41, 2050, 262145, 259, 524289, 4098, 515, 133, 1048577, 36, 73, 22
Offset: 1

Views

Author

Howard A. Landman, Sep 25 2001

Keywords

Comments

A052330 is not exactly a permutation because it has offset 0 but doesn't contain 0. A052331 is its exact inverse, which has offset 1 and contains 0. - David Wasserman, Feb 24 2005

Crossrefs

Formula

a(n) = A052331(n-1)+1. - David Wasserman, Feb 24 2005

Extensions

More terms from David Wasserman, Feb 24 2005

A303772 Inverse of A303771.

Original entry on oeis.org

0, 1, 3, 5, 9, 2, 17, 6, 33, 10, 65, 4, 129, 18, 12, 257, 513, 34, 1025, 14, 20, 66, 2049, 7, 4097, 130, 36, 22, 8193, 11, 16385, 258, 68, 514, 26, 38, 32769, 1026, 132, 15, 65537, 19, 131073, 70, 42, 2050, 262145, 260
Offset: 1

Views

Author

Antti Karttunen, May 02 2018

Keywords

Crossrefs

Programs

  • PARI
    default(parisizemax,2^31);
    up_to_e = 18;
    up_to = (2 + 2^up_to_e);
    v050376 = vector(2+up_to_e);
    A050376(n) = v050376[n];
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e,break));
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669
    v303760 = vector(up_to);
    m_inverses = Map();
    prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m_inverses,d),v303760[n] = d;mapput(m_inverses,d,n);break)); if(!v303760[n], apu = prev; while(mapisdefined(m_inverses,try = prev*A053669(apu)), apu *= A053669(apu)); v303760[n] = try; mapput(m_inverses,try,n)); prev = v303760[n]);
    A303760(n) = v303760[n+1];
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A303771(n) = A052330(A048675(A303760(n)));
    m303772 = Map();
    for(n=0,up_to-1,mapput(m303772,A303771(n),n));
    A303772(n) = mapget(m303772,n);

Formula

a(n) = A303768(A052331(n)).
Previous Showing 31-40 of 43 results. Next