Displaying 1-9 of 9 results found.
page
1
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.
+20
5
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
PROG
(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);
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); };
v322822 = rgs_transform(vector(up_to, n, A322822aux(n)));
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.
+20
4
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
COMMENTS
Like the related A322822 also this filter sequence satisfies the following two implications, for all i, j >= 1:
PROG
(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);
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); };
A323082aux(n) = if(isprime(n), -(n%2), A300840(n));
v323082 = rgs_transform(vector(up_to, n, A323082aux(n)));
a(n) = 0 if n is 1 or a Fermi-Dirac prime ( A050376), otherwise a(n) = 1 + a( A300840(n)).
+20
3
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
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.
FORMULA
a(1) = 0; for n > 1, if A302777(n) == 1, a(n) = 0, otherwise a(n) = 1 + a( A300840(n)).
PROG
(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);
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); };
Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -(n mod 4) if n is a prime, and f(n) = A300840(n) for any other number.
+20
2
1, 2, 3, 4, 5, 6, 3, 4, 7, 8, 3, 9, 5, 10, 11, 12, 5, 7, 3, 13, 14, 15, 3, 9, 16, 17, 18, 19, 5, 11, 3, 12, 20, 21, 22, 23, 5, 24, 25, 13, 5, 14, 3, 26, 27, 28, 3, 29, 30, 16, 31, 32, 5, 18, 33, 19, 34, 35, 3, 36, 5, 37, 38, 39, 40, 20, 3, 41, 42, 22, 3, 23, 5, 43, 44, 45, 46, 25, 3, 47, 48, 49, 3, 50, 51, 52, 53, 26, 5, 27, 54, 55, 56, 57, 58, 29, 5, 30, 59, 60, 5, 31, 3, 32
PROG
(PARI)
up_to = 65539;
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);
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); };
A323074aux(n) = if(isprime(n), -(n%4), A300840(n));
v323074 = rgs_transform(vector(up_to, n, A323074aux(n)));
Fermi-Dirac factorization prime shift towards larger terms: a(n) = A052330(2* A052331(n)).
+10
12
1, 3, 4, 5, 7, 12, 9, 15, 11, 21, 13, 20, 16, 27, 28, 17, 19, 33, 23, 35, 36, 39, 25, 60, 29, 48, 44, 45, 31, 84, 37, 51, 52, 57, 63, 55, 41, 69, 64, 105, 43, 108, 47, 65, 77, 75, 49, 68, 53, 87, 76, 80, 59, 132, 91, 135, 92, 93, 61, 140, 67, 111, 99, 85, 112, 156, 71, 95, 100, 189, 73, 165, 79, 123, 116, 115, 117, 192, 81
COMMENTS
Multiplicative because for coprime m and n the Fermi-Dirac factorizations of m and n are disjoint and their union is the Fermi-Dirac factorization of m * n. - Andrew Howroyd, Aug 02 2018
MATHEMATICA
fdPrimeQ[n_] := Module[{f = FactorInteger[n], e}, Length[f] == 1 && (2^IntegerExponent[(e = f[[1, 2]]), 2] == e)];
nextFDPrime[n_] := Module[{k = n + 1}, While[! fdPrimeQ[k], k++]; k];
fd[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Table[If[b[[j]] > 0, p^(2^(m - j)), Nothing], {j, 1, m}]];
a[n_] := Times @@ nextFDPrime /@ Flatten[fd @@@ FactorInteger[n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
PROG
(PARI)
up_to_e = 8192;
v050376 = vector(up_to_e);
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_e, break));
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); };
Permutation of natural numbers mapping "Fermi-Dirac factorization" to ordinary factorization: a(1) = 1, a(2* A300841(n)) = 2*a(n), a( A300841(n)) = A003961(a(n)).
+10
10
1, 2, 3, 5, 7, 4, 11, 6, 13, 10, 17, 9, 19, 14, 15, 23, 29, 22, 31, 25, 21, 26, 37, 8, 41, 34, 33, 35, 43, 12, 47, 38, 39, 46, 49, 55, 53, 58, 51, 18, 59, 20, 61, 65, 77, 62, 67, 57, 71, 74, 69, 85, 73, 28, 91, 30, 87, 82, 79, 27, 83, 86, 121, 95, 119, 44, 89, 115, 93, 50, 97, 42, 101, 94, 111, 145, 143, 52, 103, 133, 107, 106, 109, 45, 161
COMMENTS
Because "Fermi-Dirac factorization" is fundamentally different from ordinary prime factorization (as no exponents larger than 1 are allowed) this pair of permutations mapping between them is not always very intuitive. For example, we have ("as expected") A302776(n) = A302023( A052126( A302024(n))), while on the other hand, we have A302792(n) = A300841( A302023( A032742( A302024(n)))), where an additional shift-operator A300841 is needed for "correction".
PROG
(PARI)
up_to = 32768;
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); };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
GF(2)[X] factorization prime shift towards smaller terms.
+10
10
1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 7, 2, 11, 3, 8, 1, 16, 6, 13, 4, 5, 7, 22, 2, 19, 11, 12, 3, 14, 8, 25, 1, 50, 16, 29, 6, 31, 13, 28, 4, 37, 5, 38, 7, 24, 22, 41, 2, 9, 19, 32, 11, 26, 12, 47, 3, 44, 14, 55, 8, 59, 25, 10, 1, 20, 50, 61, 16, 21, 29, 118, 6, 67, 31, 88, 13, 110, 28, 53, 4, 69, 37, 18, 5, 64, 38, 73, 7, 94, 24, 87, 22, 43, 41, 52, 2, 91
COMMENTS
Let a x b stand for the carryless binary multiplication of positive integers a and b, that is, the result of operation A048720(a,b). With n having a unique factorization as f(i) x f(j) x ... x f(k), with 1 <= i <= j <= ... <= k, a(n) = f(i-1) x f(j-1) x ... x f(k-1), where f(0) = 1, and f(n) = A014580(n) for n >= 1.
PROG
(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); };
1, 1, 2, 3, 4, 2, 5, 7, 8, 3, 9, 6, 11, 4, 10, 13, 16, 5, 17, 12, 14, 7, 19, 18, 23, 8, 25, 15, 27, 6, 29, 31, 22, 9, 20, 21, 32, 11, 26, 28, 37, 10, 41, 24, 36, 13, 43, 34, 47, 16, 38, 33, 49, 17, 44, 35, 46, 19, 53, 30, 59, 23, 40, 61, 52, 14, 64, 39, 50, 12, 67, 56, 71, 25, 54, 48, 45, 18, 73, 68, 79, 27, 81, 42, 76, 29, 58, 63, 83, 15, 55, 51, 62, 31, 92
COMMENTS
For all n > 1, in the binary tree illustrated in A289272, the node which contains (has value) n, its parent node has value a(n).
Each n occurs exactly twice in this sequence.
PROG
(PARI)
A289271(n) = { my(v=0, i=0, x=1); for(d=2, oo, if(n==1, return(v)); if(1==gcd(x, d)&&1==omega(d), if(!(n%d)&&1==gcd(d, n/d), v += 2^i; n /= d; x *= d); i++)); }; \\ After Rémy Sigrist's program for A289271.
A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp, m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); };
Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -1 if n is an odd prime, and f(n) = floor(n/2) for all other numbers.
+10
6
1, 2, 3, 4, 3, 5, 3, 6, 6, 7, 3, 8, 3, 9, 9, 10, 3, 11, 3, 12, 12, 13, 3, 14, 14, 15, 15, 16, 3, 17, 3, 18, 18, 19, 19, 20, 3, 21, 21, 22, 3, 23, 3, 24, 24, 25, 3, 26, 26, 27, 27, 28, 3, 29, 29, 30, 30, 31, 3, 32, 3, 33, 33, 34, 34, 35, 3, 36, 36, 37, 3, 38, 3, 39, 39, 40, 40, 41, 3, 42, 42, 43, 3, 44, 44, 45, 45, 46, 3, 47, 47, 48, 48, 49, 49, 50, 3, 51, 51, 52, 3, 53, 3, 54, 54
COMMENTS
This sequence is a restricted growth sequence transform of a function f which is defined as f(n) = A004526(n), unless n is an odd prime, in which case f(n) = -1, which is a constant not in range of A004526. See the Crossrefs section for a list of similar sequences.
For all i, j:
The shifted version of this filter, A323161, has a remarkable ability to find many sequences related to primes and prime chains. - Antti Karttunen, Jan 06 2019
PROG
(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; };
A322809aux(n) = if((n>2)&&isprime(n), -1, (n>>1));
v322809 = rgs_transform(vector(up_to, n, A322809aux(n)));
CROSSREFS
A list of few similarly constructed sequences follows, where each sequence is an rgs-transform of such function f, for which the value of f(n) is the n-th term of the sequence whose A-number follows after a parenthesis, unless n is of the form ..., in which case f(n) is given a constant value outside of the range of that sequence:
Search completed in 0.009 seconds
|