[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a053575 -id:a053575
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of iterations of "take odd part of phi" (A053575) to reach 1 from n.
+20
11
0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 1, 2, 1, 2, 1, 2, 2, 3, 3, 2, 1, 2, 2, 3, 2, 2, 3, 4, 1, 3, 2, 1, 2, 3, 3, 2, 2, 3, 3, 4, 1, 2, 2, 3, 1, 2, 2, 3, 1, 3, 2, 3, 2, 3, 3, 2, 3, 2, 2, 3, 1, 4, 2, 3, 2, 1, 3, 3, 2, 3, 2, 3, 3, 2, 4, 3, 1, 2, 3, 2, 2
OFFSET
1,7
COMMENTS
a(n) >= A256757(n) - 1.
FORMULA
For n > 1, a(n) = a(A053575(n)) + 1.
EXAMPLE
a(18) = 2 because it takes two steps to reach 1 from 18: phi(18) = 6, the odd part of which is 3, and phi(3) = 2, the odd part of which is 1.
a(19) = 3 because it takes three steps to reach 1 from 19: phi(19) = 18, the odd part of which is 9, and phi(9) = 6, the odd part of which is 3, and phi(3) = 2, the odd part of which is 1.
MATHEMATICA
oddPhi[n_] := Module[{phi = EulerPhi[n]}, phi/2^IntegerExponent[phi, 2]]; Table[Length[NestWhileList[oddPhi[#] &, n, # > 1 &]] - 1, {n, 100}] (* T. D. Noe, Oct 07 2013 *)
PROG
(Haskell)
a227944 n = fst $
until ((== 1) . snd) (\(i, x) -> (i + 1, a053575 x)) (0, n)
-- Reinhard Zumkeller, Oct 09 2013
CROSSREFS
A variant of A049115: a(n) = A049115(n) unless n is a power of 2.
KEYWORD
nonn,easy
AUTHOR
Max Alekseyev, Oct 03 2013
STATUS
approved
Carmichael numbers k for which A053575(k) [the odd part of phi] divides k-1.
+20
11
561, 1105, 2465, 6601, 8911, 10585, 46657, 62745, 162401, 410041, 449065, 5148001, 5632705, 6313681, 6840001, 7207201, 11119105, 11921001, 19683001, 21584305, 26719701, 41298985, 55462177, 64774081, 67371265, 79411201, 83966401, 87318001, 99861985, 100427041, 172290241, 189941761, 484662529, 790623289, 809883361
OFFSET
1,1
COMMENTS
Lehmer conjectured that the equation k * phi(n) = n - 1 (with k integer) has no solutions for any composite n (i.e., when k > 1). If this sequence has no common terms with A339818, then the conjecture certainly holds.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1150 (terms below 10^22 calculated using data from Claude Goutier)
D. H. Lehmer, On Euler's totient function, Bulletin of the American Mathematical Society, 38 (1932), 745-751.
MATHEMATICA
carmichaels = Cases[Import["https://oeis.org/A002997/b002997.txt", "Table"], {_, _}][[;; , 2]]; oddPart[n_] := n/2^IntegerExponent[n, 2]; q[n_] := Divisible[n - 1, oddPart[EulerPhi[n]]]; Select[carmichaels, q] (* Amiram Eldar, Dec 26 2020 *)
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
A002322(n) = lcm(znstar(n)[2]);
isA339869(n) = ((n>1)&&!isprime(n)&&(!((n-1)%A002322(n)))&&!((n-1)%A000265(eulerphi(n))));
CROSSREFS
Intersection of A002997 and A339880.
Complement of A340092 in A002997.
Cf. also A339818, A339878, A339909.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 22 2020
STATUS
approved
Odd composite numbers k such that A053575(k) [the odd part of phi] divides k-1.
+20
9
15, 51, 85, 91, 255, 435, 451, 561, 595, 771, 1105, 1261, 1285, 1351, 1695, 2091, 2431, 2465, 3655, 3855, 4369, 4795, 5083, 5151, 5383, 6601, 6643, 6735, 7051, 8245, 8481, 8695, 8911, 8995, 9061, 9605, 10585, 11155, 13107, 15051, 15211, 16405, 16705, 17733, 18721, 19669, 20451, 21845, 22359, 23001, 26335, 28645
OFFSET
1,1
COMMENTS
No common terms with A016105. See A339870 for the reason. - Antti Karttunen, Dec 26 2020
LINKS
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
isA339880(n) = (bitand(n, 1)&&(n>1)&&!isprime(n)&&!((n-1)%A000265(eulerphi(n))));
CROSSREFS
Subsequence of A005117 and of A339879, and of A340077.
Cf. A339869, A339870 (subsequences).
Cf. also A002997, A053576, A339817.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 24 2020
STATUS
approved
Numbers k for which k-1 is a multiple of A053575(k) [the odd part of phi(k)].
+20
5
1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 19, 20, 23, 24, 28, 29, 30, 31, 32, 34, 37, 40, 41, 43, 47, 48, 51, 52, 53, 59, 60, 61, 64, 66, 67, 68, 70, 71, 73, 79, 80, 83, 85, 89, 91, 96, 97, 101, 102, 103, 107, 109, 112, 113, 120, 127, 128, 130, 131, 136, 137, 139, 149, 151, 157, 160, 163, 167, 170, 173, 176, 179
OFFSET
1,2
LINKS
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
isA339879(n) = !((n-1)%A000265(eulerphi(n)));
CROSSREFS
Subsequences: A000040, and A339880 (odd composite terms), A339869, A339870.
Cf. also comments in A339817.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 24 2020
STATUS
approved
Odd numbers k for which k-1 is a multiple of A053575(k) [the odd part of phi(k)].
+20
4
1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 37, 41, 43, 47, 51, 53, 59, 61, 67, 71, 73, 79, 83, 85, 89, 91, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 255, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313
OFFSET
1,2
COMMENTS
Sequence A003961(A340076(i)), i = 1.., sorted into ascending order. In other words, this sequence consists of such odd numbers k that A064989(k) is in A340076.
LINKS
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
isA340077(n) = ((n%2)&&!((n-1)%A000265(eulerphi(n))));
(PARI)
A064989(n) = { my(f=factor(n)); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f) };
isA340077(n) = ((n%2)&&(1==A340075(A064989(n)))); \\ Needs also code from A340075.
CROSSREFS
Subsequence of A339879.
Subsequences: A065091, A339880 (composite terms), A339869, A339870 (and their further subsequences).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 29 2020
STATUS
approved
Carmichael numbers k for which A053575(k) [the odd part of phi] does not divide k-1.
+20
3
1729, 2821, 15841, 29341, 41041, 52633, 63973, 75361, 101101, 115921, 126217, 172081, 188461, 252601, 278545, 294409, 314821, 334153, 340561, 399001, 488881, 512461, 530881, 552721, 656601, 658801, 670033, 748657, 825265, 838201, 852841, 997633, 1024651, 1033669, 1050985, 1082809, 1152271, 1193221, 1461241, 1569457
OFFSET
1,1
MATHEMATICA
odd[n_] := n/2^IntegerExponent[n, 2]; Select[Range[1, 10^6, 2], CompositeQ[#] && Divisible[# - 1, CarmichaelLambda[#]] && !Divisible[# - 1, odd @ EulerPhi[#]] &] (* Amiram Eldar, Dec 31 2020 *)
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
A002322(n) = lcm(znstar(n)[2]);
isA340092(n) = ((n>1)&&!isprime(n)&&(!((n-1)%A002322(n)))&&(0<((n-1)%A000265(eulerphi(n)))));
CROSSREFS
Complement of A339869 in A002997.
Subsequence of A340091.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 31 2020
STATUS
approved
a(n) is the number of iterations needed to reach a power of 2 starting at n and using the map k -> k-(k/p), where p is the largest prime factor of k.
+10
65
0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 1, 2, 2, 2, 0, 1, 2, 3, 1, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 0, 3, 1, 3, 2, 3, 3, 3, 1, 2, 3, 4, 2, 3, 3, 4, 1, 4, 2, 2, 2, 3, 3, 3, 2, 4, 3, 4, 2, 3, 3, 4, 0, 3, 3, 4, 1, 4, 3, 4, 2, 3, 3, 3, 3, 4, 3, 4, 1, 4, 2, 3, 3, 2, 4, 4, 2, 3, 3, 4, 3, 4, 4, 4, 1, 2, 4, 4, 2
OFFSET
1,7
COMMENTS
From Antti Karttunen, Apr 07 2020: (Start)
Also the least number of iterations of nondeterministic map k -> k-(k/p) needed to reach a power of 2, when any prime factor p of k can be used. The minimal length path to the nearest power of 2 (= 2^A064415(n)) is realized whenever one uses any of the A005087(k) distinct odd prime factors of the current k, at any step of the process. For example, this could be done by iterating with the map k -> k-(k/A078701(k)), i.e., by using the least odd prime factor of k (instead of the largest prime).
Proof: Viewing the prime factorization of changing k as a multiset ("bag") of primes, we see that liquefying any odd prime p with step p -> (p-1) brings at least one more 2 to the bag, while applying p -> (p-1) to any 2 just removes it from the bag, but gives nothing back. Thus the largest (and thus also the nearest) power of 2 is reached by eliminating - step by step - all odd primes from the bag, but none of 2's, and it doesn't matter in which order this is done.
The above implies also that the sequence is totally additive, which also follows because both A064097 and A064415 are. That A064097(n) = A329697(n) + A054725(n) for all n > 1 can be also seen by comparing the initial conditions and the recursion formulas of these three sequences.
For any n, A333787(n) is either the nearest power of 2 reached (= 2^A064415(n)), or occurs on some of the paths from n to there.
(End)
A003401 gives the numbers k where a(k) = A005087(k). See also A336477. - Antti Karttunen, Mar 16 2021
LINKS
Michael De Vlieger, Annotated fan style binary tree labeling the index n, with a color code where black represents a(n) = 0, red a(n) = 1, and magenta the largest value in a(n) for n = 1..16383.
FORMULA
From Antti Karttunen, Apr 07-19 2020: (Start)
a(1) = a(2) = 0; and for n > 2, a(p) = 1 + a(p-1) if p is an odd prime and a(n*m) = a(n) + a(m) if m,n > 1. [This is otherwise equal to the definition of A064097, except here we have a different initial condition, with a(2) = 0].
a(2n) = a(A000265(n)) = a(n).
a(p) = 1+a(p-1), for all odd primes p.
If A209229(n) == 1 [when n is a power of 2], a(n) = 0,
otherwise a(n) = 1 + a(n-A052126(n)) = 1 + a(A171462(n)).
Equivalently, for non-powers of 2, a(n) = 1 + a(n-(n/A078701(n))),
or equivalently, for non-powers of 2, a(n) = 1 + Min a(n - n/p), for p prime and dividing n.
a(n) = A064097(n) - A064415(n), or equally, a(n) = A064097(n) - A054725(n), for n > 1.
a(A019434(n)) = 1, a(A334092(n)) = 2, a(A334093(n)) = 3, etc. for all applicable n.
For all n >= 0, a(A334099(n)) = a(A000244(n)) = a(A000351(n)) = a(A001026(n)) = a(257^n) = a(65537^n) = n.
a(A122111(n)) = A334107(n), a(A225546(n)) = A334109(n).
(End)
From Antti Karttunen, Mar 16 2021: (Start)
a(n) = a(A336466(n)) + A087436(n) = A336396(n) + A087436(n).
a(A053575(n)) = A336469(n) = a(n) - A005087(n).
a(A147545(n)) = A000120(A147545(n)) - 1.
(End)
EXAMPLE
The trajectory of 15 is {12, 8}, taking 2 iterations to reach 8 = 2^3. So a(15) is 2.
From Antti Karttunen, Apr 07 2020: (Start)
Considering all possible paths from 15 to 1 nondeterministic map k -> k-(k/p), where p can be any prime factor of k, we obtain the following graph:
15
/ \
/ \
10 12
/ \ / \
/ \ / \
5 8 6
\__ | __/|
\_|_/ |
4 3
\ /
\ /
2
|
1.
It can be seen that there's also alternative route to 8 via 10 (with 10 = 15-(15/3), where 3 is not the largest prime factor of 15), but it's not any shorter than the route via 12.
(End)
MATHEMATICA
a[n_] := Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, n, # != 2^IntegerExponent[#, 2] &] -1; Array[a, 100]
PROG
(PARI) A329697(n) = if(!bitand(n, n-1), 0, 1+A329697(n-(n/vecmax(factor(n)[, 1])))); \\ Antti Karttunen, Apr 07 2020
(PARI)
up_to = 2^24;
A329697list(up_to) = { my(v=vector(up_to)); v[1] = 0; for(n=2, up_to, v[n] = if(!bitand(n, n-1), 0, 1+vecmin(apply(p -> v[n-n/p], factor(n)[, 1]~)))); (v); };
v329697 = A329697list(up_to);
A329697(n) = v329697[n]; \\ Antti Karttunen, Apr 07 2020
(PARI) A329697(n) = if(n<=2, 0, if(isprime(n), A329697(n-1)+1, my(f=factor(n)); (apply(A329697, f[, 1])~ * f[, 2]))); \\ Antti Karttunen, Apr 19 2020
CROSSREFS
Cf. A000079, A334101, A334102, A334103, A334104, A334105, A334106 for positions of 0 .. 6 in this sequence, and also array A334100.
Cf. A334099 (a right inverse, positions of the first occurrence of each n).
Cf. A334091 (first differences), A335429 (partial sums).
Cf. also A331410 (analogous sequence when using the map k -> k + k/p), A334861, A335877 (their sums and differences), see also A335878 and A335884, A335885.
KEYWORD
easy,nonn
AUTHOR
Ali Sada and Robert G. Wilson v, Feb 28 2020
STATUS
approved
Fully multiplicative with a(p) = A000265(p-1) for any prime p, where A000265(k) gives the odd part of k.
+10
30
1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 3, 1, 1, 1, 1, 9, 1, 3, 5, 11, 1, 1, 3, 1, 3, 7, 1, 15, 1, 5, 1, 3, 1, 9, 9, 3, 1, 5, 3, 21, 5, 1, 11, 23, 1, 9, 1, 1, 3, 13, 1, 5, 3, 9, 7, 29, 1, 15, 15, 3, 1, 3, 5, 33, 1, 11, 3, 35, 1, 9, 9, 1, 9, 15, 3, 39, 1, 1, 5, 41, 3, 1, 21, 7, 5, 11, 1, 9, 11, 15, 23, 9, 1, 3, 9, 5, 1, 25, 1, 51, 3, 3
OFFSET
1,7
COMMENTS
For the comment here, we extend the definition of the second kind of Cunningham chain (see Wikipedia-article) so that also isolated primes for which neither (p+1)/2 nor 2p-1 is a prime are considered to be in singular chains, that is, in chains of the length one. If we replace one or more instances of any particular odd prime factor p in n with any odd prime q in such a chain, so that m = (q^k)*n / p^(e-k), where e is the exponent of p of n, and k <= e is the number of instances of p replaced with q, then it holds that a(m) = a(n), and by induction, the value stays invariant for any number of such replacements. Note also that A001222, but not necessarily A001221 will stay invariant in such changes.
For example, if some of the odd prime divisors p of n are in A005382, then replacing it with 2p-1 (i.e., the corresponding terms of A005383), gives a new number m, for which a(m) = a(n). And vice versa, the same is true for any of the prime divisors > 3 of n that are in A005383, then replacing any one of them with (p+1)/2 will not affect the result. For example, a(37*37*37) = a(19*37*73) = 729 as 37 is both in A005382 and in A005383.
a(n) = A053575(n) for squarefree n (A005117). - Antti Karttunen, Mar 16 2021
FORMULA
a(n) = A000265(A003958(n)) = A000265(A333787(n)).
a(A000010(n)) = A336468(n) = a(A053575(n)).
A329697(a(n)) = A336396(n) = A329697(n) - A087436(n).
a(n) = A335915(n) / A336467(n). - Antti Karttunen, Mar 16 2021
MATHEMATICA
Array[Times @@ Map[If[# <= 2, 1, (# - 1)/2^IntegerExponent[# - 1, 2]] &, Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#]]] &, 105] (* Michael De Vlieger, Jul 24 2020 *)
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
KEYWORD
nonn,mult,look
AUTHOR
Antti Karttunen, Jul 22 2020
STATUS
approved
Dedekind psi function applied to the odd part of n: a(n) = A001615(A000265(n)).
+10
11
1, 1, 4, 1, 6, 4, 8, 1, 12, 6, 12, 4, 14, 8, 24, 1, 18, 12, 20, 6, 32, 12, 24, 4, 30, 14, 36, 8, 30, 24, 32, 1, 48, 18, 48, 12, 38, 20, 56, 6, 42, 32, 44, 12, 72, 24, 48, 4, 56, 30, 72, 14, 54, 36, 72, 8, 80, 30, 60, 24, 62, 32, 96, 1, 84, 48, 68, 18, 96, 48, 72, 12, 74, 38, 120, 20, 96, 56, 80, 6, 108, 42, 84, 32, 108
OFFSET
1,3
COMMENTS
Coincides with A000593 on A122132.
LINKS
FORMULA
Multiplicative with a(2^e) = 1, a(p^e) = (p+1)*p^(e-1) for all odd primes p.
a(n) = A001615(A000265(n)).
a(n) = A206787(n) * A336651(n). - Antti Karttunen, Feb 11 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = 4/Pi^2 = 0.405284... (A185199). - Amiram Eldar, Nov 19 2022
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s))*(4^s-2^(s+1))/(4^s-1). - Amiram Eldar, Jan 04 2023
MATHEMATICA
f[p_, e_] := If[p == 2, 1, (p + 1)*p^(e - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 31 2021 *)
PROG
(PARI) A347385(n) = if(1==n, n, my(f=factor(n>>valuation(n, 2))); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1)));
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Aug 31 2021
STATUS
approved
Exponent of 2 in phi(n) where phi(n) = A000010(n).
+10
9
0, 0, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 3, 3, 4, 1, 1, 3, 2, 1, 1, 3, 2, 2, 1, 2, 2, 3, 1, 4, 2, 4, 3, 2, 2, 1, 3, 4, 3, 2, 1, 2, 3, 1, 1, 4, 1, 2, 5, 3, 2, 1, 3, 3, 2, 2, 1, 4, 2, 1, 2, 5, 4, 2, 1, 5, 2, 3, 1, 3, 3, 2, 3, 2, 2, 3, 1, 5, 1, 3, 1, 3, 6, 1, 3, 3, 3, 3, 3, 2, 2, 1, 3, 5, 5, 1, 2, 3, 2, 5, 1, 4, 4, 2, 1, 2, 2, 3, 3, 4, 4, 2, 3, 3, 3, 1, 5, 5
OFFSET
1,5
LINKS
FORMULA
a(n) = A007814(A000010(n)).
A000010(n) = A053575(n) * 2^a(n). - Antti Karttunen, May 26 2017
Additive with a(2^e) = e-1, and a(p^e) = A007814(p-1) for an odd prime p. - Amiram Eldar, Sep 05 2023
EXAMPLE
For n = 513 = 27*19, phi(513) = 4*81 so exponent of 2 is 2, thus a(513) = 2.
MATHEMATICA
IntegerExponent[Array[EulerPhi, 120], 2] (* Michael De Vlieger, Aug 16 2017 *)
PROG
(PARI) vector(66, n, valuation(eulerphi(n), 2)) \\ Joerg Arndt, Apr 22 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jan 18 2000
EXTENSIONS
Data section extended to 120 terms by Antti Karttunen, May 26 2017
STATUS
approved

Search completed in 0.014 seconds