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

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

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

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

A334865 a(n) = A156552(A225546(n)).

Original entry on oeis.org

0, 1, 3, 2, 15, 7, 255, 5, 6, 31, 65535, 11, 4294967295, 511, 63, 4, 18446744073709551615, 13, 340282366920938463463374607431768211455, 47, 1023, 131071, 115792089237316195423570985008687907853269984665640564039457584007913129639935, 23, 30, 8589934591, 27, 767
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Crossrefs

Inverse permutation of A334866. Composition of permutations A156552 and A225546, and also of A054429 and A334859.
Cf. A334871.

Formula

a(n) = A156552(A225546(n)).
a(n) = A054429(A334859(n)).
For n > 1, A070939(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];
Showing 1-5 of 5 results.