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.

A334871 Number of steps needed to reach 1 when starting from n and iterating with A334870.

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 3, 5, 16, 4, 32, 9, 6, 3, 64, 4, 128, 6, 10, 17, 256, 5, 5, 33, 5, 10, 512, 7, 1024, 4, 18, 65, 12, 4, 2048, 129, 34, 7, 4096, 11, 8192, 18, 7, 257, 16384, 5, 9, 6, 66, 34, 32768, 6, 20, 11, 130, 513, 65536, 8, 131072, 1025, 11, 4, 36, 19, 262144, 66, 258, 13, 524288, 5, 1048576, 2049, 7, 130
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

Distance of n from the root (1) in binary trees like A334860 and A334866.
Each n > 0 occurs 2^(n-1) times.
a(n) is the size of the inner lining of the integer partition with Heinz number A225546(n), which is also the size of the largest hook of the same partition. (After Gus Wiseman's Apr 02 2019 comment in A252464).

Crossrefs

Programs

  • PARI
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A334871(n) = { my(s=0); while(n>1,s++; n = A334870(n)); (s); };
    
  • PARI
    \\ Much faster:
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A334871(n) = { my(s=0); while(n>1, if(issquare(n), s++; n = sqrtint(n), s += A048675(core(n)); n /= core(n))); (s); };

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A334870(n)).
a(n) = A252464(A225546(n)).
a(n) = A048675(A007913(n)) + a(A008833(n)).
For n > 1, a(n) = 1 + A048675(A007913(n)) + a(A000188(n)).
For n > 1, a(n) = A070939(A334859(n)) = A070939(A334865(n)).
For all n >= 1, a(n) >= A299090(n).
For all n >= 1, a(n) >= A334872(n).

A334872 Number of steps needed to reach either 1 or one of the "Fermi-Dirac primes" (A050376) when starting from n and iterating with A334870.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 0, 0, 1, 0, 4, 2, 1, 0, 3, 0, 1, 2, 8, 0, 3, 0, 1, 2, 1, 4, 2, 0, 1, 2, 5, 0, 3, 0, 16, 4, 1, 0, 2, 0, 1, 2, 32, 0, 3, 4, 9, 2, 1, 0, 6, 0, 1, 8, 2, 4, 3, 0, 64, 2, 5, 0, 3, 0, 1, 2, 128, 8, 3, 0, 4, 0, 1, 0, 10, 4, 1, 2, 17, 0, 5, 8, 256, 2, 1, 4, 3, 0, 1, 16, 2, 0, 3, 0, 33, 6
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Crossrefs

Cf. A050376 (positions of zeros after 1), A302777, A334859, A334865, A334870, A334871.

Programs

  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A334872(n) = { my(s=0); while(n>1 && !A302777(n), s++; n = A334870(n)); (s); };
    
  • PARI
    \\ Much faster, A302777 like in above:
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1])));
    A334872(n) = { my(s=0); while(n>1 && !A302777(n), if(issquarefree(n), return(s+A048675(A052126(n)))); if(issquare(n), s++; n = sqrtint(n), s += A048675(core(n)); n /= core(n))); (s); };

Formula

If n = 1 or A302777(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A334870(n)).
For all n >= 1, a(n) <= A334871(n).

A334869 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(1) = 0 and for n > 1, f(n) = A334870(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

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; };
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A334869aux(n) = if(1==n,0,A334870(n));
    v334869 = rgs_transform(vector(up_to,n,A334869aux(n)));
    A334869(n) = v334869[n];

A334868 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(1) = 0 and for n > 1, f(n) = -1 if n is in A050376, and f(n) = A334870(n) otherwise.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

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

Crossrefs

Cf. A050376 (positions of 2's), A305979, A334869, A334870, A334872.

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));
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A334868aux(n) = if(1==n,0,if(A302777(n),-1,A334870(n)));
    v334868 = rgs_transform(vector(up_to,n,A334868aux(n)));
    A334868(n) = v334868[n];

A335428 Prime exponent of the first Fermi-Dirac factor (number of form p^(2^k), A050376) reached, when starting from n and iterating with A334870, with a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 2, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 26 2020

Keywords

Examples

			For n=27, when iterating with A334870, we obtain the path 27 -> 18 -> 9, with that 9 being the first prime power encountered that has an exponent of the form 2^k, as 9 = 3^2, thus a(27) = 2. See the binary tree A334860 or A334866 for how such paths go.
For n=900, when iterating with A334870 we obtain the path 900 -> 30 -> 15 -> 10 -> 5, and 5^1 is finally a prime power with an exponent that is two's power, thus a(900) = 1. Note that 900 is the first such position of 1 in this sequence that is not listed in A333634.
		

Crossrefs

Programs

  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A335428(n) = { while(n>1 && !A302777(n), n = A334870(n)); isprimepower(n); };
    
  • PARI
    \\ Faster, A209229 and A302777 like in above:
    A335428(n) = if(1==n,0, while(!A302777(n), if(issquarefree(n), return(1)); if(issquare(n), n = sqrtint(n), n /= core(n))); isprimepower(n));

A335427 a(1) = 0; for k >= 2, a(prime(k)) = 0, a(k^2) = 2 * a(k); otherwise a(n) = a(A334870(n)) + 1.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 4, 0, 1, 2, 4, 0, 1, 0, 6, 2, 1, 0, 5, 0, 1, 2, 10, 0, 3, 0, 5, 2, 1, 4, 2, 0, 1, 2, 7, 0, 3, 0, 18, 4, 1, 0, 6, 0, 1, 2, 34, 0, 3, 4, 11, 2, 1, 0, 8, 0, 1, 8, 6, 4, 3, 0, 66, 2, 5, 0, 3, 0, 1, 2, 130, 8, 3, 0, 8, 0, 1, 0, 12, 4, 1, 2, 19, 0, 5, 8, 258, 2, 1, 4, 7, 0, 1, 16, 2, 0, 3, 0, 35, 6
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Jun 15 2020

Keywords

Crossrefs

A052126, A225546, A334870, A335426 are used in formulas defining this sequence.
Related fully additive sequence: A048675.
Cf. A062090 (indices of zeros), A003159 (indices of even values), A036554 (indices of odd values).
A003961, A019565 are used to express relationship between terms of this sequence.

Programs

  • PARI
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A335427(n) = if(n<=2,n-1, if(isprime(n), 0, if(issquare(n), 2*A335427(sqrtint(n)), 1+A335427(A334870(n)))));
    
  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1])));
    A335427(n) = if(n<=2,n-1, if(issquarefree(n), A048675(A052126(n)), my(k=core(n)); A048675(k) + 2*A335427(sqrtint(n/k))));

Formula

Alternative definition: (Start)
a(1) = 0, a(2) = 1; otherwise for n = k * m^2, k squarefree:
if m = 1, a(n) = A048675(A052126(k));
if m > 1, a(n) = A048675(k) + 2 * a(m).
(End)
For n = 4 * A122132(k), a(n) = A048675(n).
More generally, a(n) = A048675(n) if and only if n is in A335738.
a(n) = A335426(A225546(n)).
a(A003961(2k+1)) = 2 * a(2k+1).
If n is in A036554, a(n) = a(n/2) + 1; otherwise for n <> 3, a(n) = 2 * a(A019565(k/2) * m^2) - a(m^2), where n = A019565(k) * m^2.

A334866 a(0) = 1, and then after, a(2n) = a(n)^2, a(2n+1) = A334747(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 16, 8, 9, 6, 256, 32, 64, 12, 81, 18, 36, 5, 65536, 512, 1024, 48, 4096, 128, 144, 24, 6561, 162, 324, 27, 1296, 72, 25, 10, 4294967296, 131072, 262144, 768, 1048576, 2048, 2304, 96, 16777216, 8192, 16384, 192, 20736, 288, 576, 20, 43046721, 13122, 26244, 243, 104976, 648, 729, 54, 1679616, 2592, 5184, 108, 625, 50, 100, 15
Offset: 0

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

This irregular table can be represented as a binary tree. Each child to the left is obtained by squaring the parent, and each child to the right is obtained by applying A334747 to the parent:
1
|
...................2...................
4 3
16......../ \........8 9......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
256 32 64 12 81 18 36 5
65536 512 1024 48 4096 128 144 24 6561 162 324 27 1296 72 25 10
etc.
This is the mirror image of the tree in A334860.

Crossrefs

Cf. A334865 (inverse permutation), A334860 (mirror image).
Composition of permutations A005940 and A225546.
Cf. A001146 (left edge of the tree), A019565 (right edge), A334110 (the left children of the right edge).

Programs

Formula

a(0) = 1, and then after, a(2n) = a(n)^2, a(2n+1) = A334747(a(n)).
a(n) = A225546(A005940(1+n)).
For all n >= 0, A048675(a(n)) = A087808(n).

A334747 Let p be the smallest prime not dividing the squarefree part of n. Multiply n by p and divide by the product of all smaller primes.

Original entry on oeis.org

2, 3, 6, 8, 10, 5, 14, 12, 18, 15, 22, 24, 26, 21, 30, 32, 34, 27, 38, 40, 42, 33, 46, 20, 50, 39, 54, 56, 58, 7, 62, 48, 66, 51, 70, 72, 74, 57, 78, 60, 82, 35, 86, 88, 90, 69, 94, 96, 98, 75, 102, 104, 106, 45, 110, 84, 114, 87, 118, 120, 122, 93, 126, 128, 130, 55
Offset: 1

Views

Author

Peter Munn, May 09 2020

Keywords

Comments

A bijection from the positive integers to the nonsquares, A000037.
A003159 (which has asymptotic density 2/3) lists index n such that a(n) = 2n. The sequence maps the terms of A003159 1:1 onto A036554, defining a bijection between them.
Similarly, bijections are defined from A007417 to A325424, from A325424 to A145204\{0}, and from the first in each of the following pairs to the nonsquare integers in the second: (A145204\{0}, A036668), (A036668, A007417), (A036554, A003159), (A332820, A332821), (A332821, A332822), (A332822, A332820). Note that many of these are between sets where membership depends on whether a number's squarefree part divides by 2 and/or 3.
Starting from 1, and iterating the sequence as a(1) = 2, a(2) = 3, a(3) = 6, a(6) = 5, a(5) = 10, etc., runs through the squarefree numbers in the order they appear in A019565. - Antti Karttunen, Jun 08 2020

Examples

			168 = 42*4 has squarefree part 42 (and square part 4). The smallest prime absent from 42 = 2*3*7 is 5 and the product of all smaller primes is 2*3 = 6. So a(168) = 168*5/6 = 140.
		

Crossrefs

Permutation of A000037.
Row 2, and therefore column 2, of A331590. Cf. A334748 (row 3).
A007913, A034386, A053669, A225546 are used in formulas defining the sequence.
The formula section details how the sequence maps the terms of A002110, A003961, A019565; and how f(a(n)) relates to f(n) for f = A008833, A048675, A267116; making use of A003986.
Subsequences: A016825 (odd bisection), A036554, A329575.
Bijections are defined that relate to A003159, A007417, A036668, A145204, A325424, A332820, A332821, A332822.
Cf. also binary trees A334860, A334866 and A334870 (a left inverse).

Programs

  • PARI
    a(n) = {my(c=core(n), m=n); forprime(p=2, , if(c % p, m*=p; break, m/=p)); m;} \\ Michel Marcus, May 22 2020

Formula

a(n) = n * m / A034386(m-1), where m = A053669(A007913(n)).
a(n) = A331590(2, n) = A225546(2 * A225546(n)).
a(A019565(n)) = A019565(n+1).
a(k * m^2) = a(k) * m^2.
a(A003961(n)) = 2 * A003961(n).
a(2 * A003961(n)) = A003961(a(n)).
a(A002110(n)) = prime(n+1).
A048675(a(n)) = A048675(n) + 1.
A008833(a(n)) = A008833(n).
A267116(a(n)) = A267116(n) OR 1, where OR denotes the bitwise operation A003986.
a(A003159(n)) = A036554(n) = 2 * A003159(n).
A334870(a(n)) = n. - Antti Karttunen, Jun 08 2020
Showing 1-8 of 8 results.