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

A334204 a(n) = A329697(A163511(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 09 2020

Keywords

Comments

As the underlying sequence A163511 can be represented as a binary tree, so can be this:
0
|
...................0...................
0 1
0......../ \........2 1......../ \........1
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
0 3 2 2 1 2 1 2
0 4 3 3 2 3 2 4 1 3 2 3 1 3 2 2
etc.
The nodes at the left edge are all zeros, and their right-hand children give positive integers, A000027.
Each left-hand leaning branch stays constant, because A329697(2n) = A329697(n).
The right-hand leaning branches are not necessarily monotonic. For example, a((2^6)-1) = 2 > 1 = a((2^7)-1), because A000040(7) = 17 is a Fermat prime (but A000040(6) = 13 is not), and therefore the latter is only one step away from a power of 2.

Crossrefs

Programs

Formula

a(n) = A329697(A163511(n)).
a(n) = A334109(A334860(n)).
a(n) = a(2n) = a(A000265(n)).
For all n >= 0, a(2^n) = 0, a(2^n + 1) = n.

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

A334870 If n is a square, a(n) = A000196(n), and for nonsquare n, let p be the smallest prime dividing the squarefree part of n. Divide n by p and multiply by the product of all smaller primes.

Original entry on oeis.org

1, 1, 2, 2, 6, 3, 30, 4, 3, 5, 210, 8, 2310, 7, 10, 4, 30030, 9, 510510, 24, 14, 11, 9699690, 12, 5, 13, 18, 120, 223092870, 15, 6469693230, 16, 22, 17, 42, 6, 200560490130, 19, 26, 20, 7420738134810, 21, 304250263527210, 840, 54, 23, 13082761331670030, 32, 7, 25, 34, 9240, 614889782588491410, 27, 66, 28, 38, 29
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

Each natural numbers occurs exactly twice in this sequence.
In binary trees like A334860 and A334866, for n > 2, a(n) gives the parent node of node n.
For nonsquare numbers, n, with squarefree part A019565(k) and square part m, a(n) is the number with squarefree part A019565(k-1) and square part m. - Peter Munn, Jul 14 2020

Crossrefs

Programs

  • Mathematica
    Array[If[IntegerQ[#2], #2, #1/#2*Product[Prime@i, {i, PrimePi@#2 - 1}] & @@ {#1, FactorInteger[#2 /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2][[1, 1]]}] & @@ {#, Sqrt[#]} &, 58] (* Michael De Vlieger, Jun 26 2020 *)
  • 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));

Formula

a(A334747(n)) = n.
a(A000040(n)) = A002110(n-1).
a(n^2) = n.
a(n) = A225546(A252463(A225546(n))). - Peter Munn, Jun 08 2020

A334110 The squares of squarefree numbers (A062503), ordered lexicographically according to their prime factors. a(n) = Product_{k in I} prime(k+1)^2, where I are the indices of nonzero binary digits in n = Sum_{k in I} 2^k.

Original entry on oeis.org

1, 4, 9, 36, 25, 100, 225, 900, 49, 196, 441, 1764, 1225, 4900, 11025, 44100, 121, 484, 1089, 4356, 3025, 12100, 27225, 108900, 5929, 23716, 53361, 213444, 148225, 592900, 1334025, 5336100, 169, 676, 1521, 6084, 4225, 16900, 38025, 152100, 8281, 33124, 74529, 298116, 207025, 828100, 1863225, 7452900, 20449, 81796, 184041
Offset: 0

Views

Author

Antti Karttunen and Peter Munn, May 01 2020

Keywords

Comments

For the lexicographic ordering, the prime factors must be written in nonincreasing order. If we write the factors in nondecreasing order, we get a lexicographically ordered set with an order type that is greater than a natural number index - the resulting sequence does not include all qualifying numbers. (Note also that the symbols used for the lexicographic order are the prime numbers, not their digits.)
a(n) is the n-th power of 4 in the monoid defined in A331590.
Conjecture: a(n) is the position of the first occurrence of n in A334109.

Examples

			The initial terms are shown below, equated with the product of their prime factors to exhibit the lexicographic ordering. The list starts with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
    1 = .
    4 = 2*2.
    9 = 3*3.
   36 = 3*3*2*2.
   25 = 5*5.
  100 = 5*5*2*2.
  225 = 5*5*3*3.
  900 = 5*5*3*3*2*2.
   49 = 7*7.
  196 = 7*7*2*2.
  441 = 7*7*3*3.
		

Crossrefs

Cf. A000079, A019565 (square roots), A048675, A097248, A225546, A267116, A332382, A334109 (a left inverse).
Column 2 of A329332. Permutation of A062503.
After 1, the right children of the leftmost edge of A334860, or respectively, the left children of the rightmost edge of A334866.
Subsequences: A001248, A061742, A166329.
Subsequence of A052330.
A003961, A003987, A059897, A331590 are used to express relationship between terms of this sequence.

Programs

  • Mathematica
    Array[If[# == 0, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[3^#]]] &, 51, 0] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    A334110(n) = { my(p=2,m=1); while(n, if(n%2, m *= p^2); n >>= 1; p = nextprime(1+p)); (m); };

Formula

a(n) = A019565(n)^2.
For n >= 1, a(A000079(n-1)) = A001248(n).
For all n >= 0, A334109(a(n)) = n.
a(n+k) = A331590(a(n), a(k)).
a(n XOR k) = A059897(a(n), a(k)), where XOR denotes bitwise exclusive-or, A003987.
a(n) = A225546(3^n).
a(2n) = A003961(a(n)).
a(2n+1) = 4 * a(2n).
a(2^k-1) = A061742(k).
A267116(a(n)) = 2.
A048675(a(n)) = 2n.
A097248(a(n)) = A332382(n) = A019565(2n).

A334109 a(n) = A329697(A225546(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 29 2020

Keywords

Comments

Conjecture: Each k >= 0 occurs for the first time at A334110(k) = A019565(k)^2. Note that each k must occur first time on square n, because of the identity a(n) = a(A008833(n)). However, is there any reason to exclude squares with prime exponents > 2 from the candidates? See also comments in A334204.

Crossrefs

Programs

  • Mathematica
    Map[-1 + Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # != 2^IntegerExponent[#, 2] &] &, Array[If[# == 1, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[#]]] &, 105] ] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    A019565(n) = factorback(vecextract(primes(logint(n+!n, 2)+1), n));
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A334109(n) = { my(f=factor(n),pis=apply(primepi,f[,1]),es=f[,2]); sum(k=1,#f~,(2^(pis[k]-1))*A329697(A019565(es[k]))); };

Formula

Additive with a(prime(i)^j) = A000079(i-1) * A329697(A019565(j)), a(m*n) = a(m)+a(n) if gcd(m,n) = 1.
Alternatively, additive with a(prime(i)^(2^k)) = 2^(i-1) * A329697(prime(k+1)), a(m*n) = a(m)+a(n) if A059895(m,n) = 1. - Peter Munn, May 04 2020
a(n) = A329697(A225546(n)) = A329697(A331736(n)).
a(n) = a(A008833(n)).
For all n >= 0, a(A334110(n)) = n, a(A334860(n)) = A334204(n).
a(A331590(m,k)) = a(m) + a(k); a(A003961(n)) = 2*a(n). - Peter Munn, Apr 30 2020

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

A334859 a(n) = A243071(A225546(n)).

Original entry on oeis.org

0, 1, 2, 3, 8, 4, 128, 6, 5, 16, 32768, 12, 2147483648, 256, 32, 7, 9223372036854775808, 10, 170141183460469231731687303715884105728, 48, 512, 65536, 57896044618658097711785492504343953926634992332820282019728792003956564819968, 24, 17, 4294967296, 20, 768
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Crossrefs

Inverse permutation of A334860. Composition of permutations A225546 and A243071, and also of A054429 and A334865.

Formula

a(n) = A243071(A225546(n)).
a(n) = A054429(A334865(n)).
For n >= 1, A000120(a(n)) = A299090(n).
For n > 1, A070939(a(n)) = A334871(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));
Showing 1-9 of 9 results.