[go: up one dir, main page]

login
Search: a285330 -id:a285330
     Sort: relevance | references | number | modified | created      Format: long | short | data
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) = A285330(n) for all other numbers.
+20
7
1, 2, 3, 4, 3, 5, 3, 6, 5, 7, 3, 8, 3, 9, 8, 10, 3, 11, 3, 12, 12, 13, 3, 14, 7, 15, 9, 16, 3, 17, 3, 18, 14, 19, 11, 20, 3, 21, 22, 23, 3, 24, 3, 25, 26, 27, 3, 28, 17, 29, 30, 31, 3, 32, 23, 33, 34, 35, 3, 36, 3, 37, 38, 39, 28, 40, 3, 22, 41, 42, 3, 43, 3, 44, 45, 46, 20, 47, 3, 48, 49, 50, 3, 51, 52, 53, 54, 55, 3, 56, 29, 57, 58, 59, 60, 61, 3, 62, 15
OFFSET
1,2
LINKS
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; };
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(issquarefree(n), A048675(n), A285328(n));
A322807aux(n) = if((n%2)&&isprime(n), -1, A285330(n));
v322807 = rgs_transform(vector(up_to, n, A322807aux(n)));
A322807(n) = v322807[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 26 2018
STATUS
approved
Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.
+20
4
1, 2, 3, 3, 4, 5, 6, 4, 5, 7, 8, 9, 10, 11, 9, 6, 12, 13, 14, 15, 15, 16, 17, 18, 7, 19, 11, 20, 21, 22, 23, 8, 18, 24, 13, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 22, 38, 39, 40, 41, 42, 29, 43, 44, 45, 46, 47, 48, 49, 50, 10, 37, 51, 52, 28, 53, 54, 55, 56, 57, 58, 59, 60, 25, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 38
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A285330.
LINKS
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; };
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(issquarefree(n), A048675(n), A285328(n));
v322806 = rgs_transform(vector(up_to, n, A285330(n)));
A322806(n) = v322806[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 26 2018
STATUS
approved
a(1) = 0; for n > 1, a(n) = A001221(A285330(n)).
+20
3
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 2, 3, 2, 1, 3, 1, 2, 2, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 3, 3, 3, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2
OFFSET
1,12
COMMENTS
For all i, j:
A322806(i) = A322806(j) => a(i) = a(j),
A322807(i) = A322807(j) => a(i) = a(j).
LINKS
FORMULA
a(1) = 0; for n > 1, a(n) = A001221(A285330(n)).
If n > 1 is squarefree, a(n) = A322812(n) = A001221(A048675(n)), otherwise a(n) = A001221(A285328(n)) = A001221(n).
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(issquarefree(n), A048675(n), A285328(n));
A322811(n) = if(1==n, 0, omega(A285330(n)));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 27 2018
STATUS
approved
Lexicographically earliest such sequence a that a(i) = a(j) => A278222(A285330(i)) = A278222(A285330(j)) for all i, j.
+20
3
1, 2, 2, 2, 2, 3, 2, 2, 3, 4, 2, 3, 2, 4, 3, 2, 2, 3, 2, 4, 4, 4, 2, 4, 4, 4, 4, 5, 2, 5, 2, 2, 4, 4, 3, 3, 2, 4, 4, 4, 2, 6, 2, 6, 7, 4, 2, 4, 5, 4, 4, 6, 2, 3, 4, 5, 4, 4, 2, 7, 2, 4, 8, 2, 4, 6, 2, 4, 4, 6, 2, 9, 2, 4, 10, 6, 3, 6, 2, 6, 9, 4, 2, 8, 4, 4, 4, 6, 2, 7, 4, 11, 4, 4, 4, 4, 2, 5, 4, 4, 2, 6, 2, 6, 5
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A278222(A285330(n)).
For all i, j:
A322806(i) = A322806(j) => a(i) = a(j),
A322807(i) = A322807(j) => a(i) = a(j),
a(i) = a(j) => A322862(i) = A322862(j).
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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(moebius(n)<>0, A048675(n), A285328(n));
A278222(n) = A046523(A005940(1+n));
v322861 = rgs_transform(vector(up_to, n, A278222(A285330(n))));
A322861(n) = v322861[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 31 2018
STATUS
approved
a(n) = A000120(A285330(n)).
+20
3
0, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 3, 4, 2, 1, 2, 3, 2, 2, 3, 1, 2, 2, 3, 2, 2, 1, 4, 1, 2, 3, 1, 2, 3, 1, 2, 2, 3, 1, 4, 1, 2, 4, 3, 2, 3, 1, 3, 4, 2, 1, 3, 2, 2, 2, 3, 1, 4, 2, 4, 2, 2, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 3
OFFSET
1,6
FORMULA
a(n) = A000120(A285330(n)).
If n is squarefree, a(n) = A322869(n) = A000120(A048675(n)) = A001221(n), otherwise a(n) = A000120(A285328(n)).
MATHEMATICA
Table[DigitCount[#, 2, 1] &@ Which[n == 1, 0, MoebiusMu@ n != 0, Total@ Map[#2*2^(PrimePi@ #1 - 1) & @@ # &, FactorInteger[n]], True, With[{r = DivisorSum[n, EulerPhi[#] Abs@ MoebiusMu[#] &]}, SelectFirst[Range[n - 2, 2, -1], DivisorSum[#, EulerPhi[#] Abs@ MoebiusMu[#] &] == r &]]], {n, 105}] (* Michael De Vlieger, Dec 31 2018 *)
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(moebius(n)<>0, A048675(n), A285328(n));
A322862(n) = hammingweight(A285330(n));
\\ Or just as:
A322862(n) = if(issquarefree(n), omega(n), hammingweight(A285328(n)));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 31 2018
STATUS
approved
A binary representation of the primes that divide a number, shown in decimal.
+10
50
0, 1, 2, 1, 4, 3, 8, 1, 2, 5, 16, 3, 32, 9, 6, 1, 64, 3, 128, 5, 10, 17, 256, 3, 4, 33, 2, 9, 512, 7, 1024, 1, 18, 65, 12, 3, 2048, 129, 34, 5, 4096, 11, 8192, 17, 6, 257, 16384, 3, 8, 5, 66, 33, 32768, 3, 20, 9, 130, 513, 65536, 7, 131072, 1025, 10, 1, 36, 19, 262144, 65, 258
OFFSET
1,3
COMMENTS
The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.
For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - Antti Karttunen, Apr 17 2017
From Antti Karttunen, Jun 18 & 20 2017: (Start)
A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).
For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.
Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.
If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.
(End)
Binary rank of the distinct prime indices of n, where the binary rank of an integer partition y is given by Sum_i 2^(y_i-1). For all prime indices (with multiplicity) we have A048675. - Gus Wiseman, May 25 2024
FORMULA
Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - Vladeta Jovovic, Oct 29 2003
a(n) gives the m such that A019565(m) = A007947(n). - Naohiro Nomoto, Oct 30 2003
A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - Reinhard Zumkeller, Nov 30 2003
G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
From Antti Karttunen, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)
a(n) = A048675(A007947(n)).
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).
A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]
A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]
a(A293214(n)) = A218403(n).
a(A293442(n)) = A267116(n).
A069010(a(n)) = A287170(n).
A007088(a(n)) = A276379(n).
A038374(a(n)) = A300820(n) for n >= 1.
(End)
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).
a(A003961(n)) = 2*a(n).
a(n^2) = a(n).
a(n) = A267116(A225546(n)).
a(A225546(n)) = A267116(n).
(End)
EXAMPLE
a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).
a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.
MATHEMATICA
a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Dec 12 2011 *)
PROG
(Haskell)
a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row
-- Reinhard Zumkeller, Jul 16 2013
(PARI) a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[, 1]), v = concat(v, vecsearch(f[, 1], p)!=0); ); fromdigits(Vecrev(v), 2)); } \\ Michel Marcus, Jun 05 2017
(PARI) A087207(n)=vecsum(apply(p->1<<primepi(p-1), factor(n)[, 1])) \\ Significantly faster than using sum(...). - M. F. Hasler, Jun 23 2017
(Python)
from sympy import factorint, primepi
def a(n):
return sum(2**primepi(i - 1) for i in factorint(n))
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017
(Scheme)
(definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec
(define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - Antti Karttunen, Jun 19 2017
CROSSREFS
For partial sums see A288566.
Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.
Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.
A003986, A003961, A059896 are used to express relationship between terms of this sequence.
Related to A267116 via A225546.
Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).
A048675 gives binary rank of prime indices.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices (listed A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- sum A029931, product A096111
- max A029837 or A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877
KEYWORD
nonn,base,nice
AUTHOR
Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003
EXTENSIONS
More terms from Don Reble, Ray Chandler and Naohiro Nomoto, Oct 28 2003
Name clarified by Antti Karttunen, Jun 18 2017
STATUS
approved
a(0) = 1, a(1) = 2, a(2n) = A019565(a(n)), a(2n+1) = A065642(a(n)).
+10
18
1, 2, 3, 4, 6, 9, 5, 8, 15, 12, 14, 27, 10, 25, 7, 16, 210, 45, 35, 18, 105, 28, 462, 81, 21, 20, 154, 125, 30, 49, 11, 32, 10659, 420, 910, 75, 78, 175, 33, 24, 3094, 315, 385, 56, 780045, 924, 374, 243, 110, 63, 55, 40, 4389, 308, 170170, 625, 1155, 60, 286, 343, 42, 121, 13, 64, 54230826, 31977, 28405, 630, 1330665, 1820, 714
OFFSET
0,2
COMMENTS
Note the indexing: the domain starts from 0, while the range excludes zero.
This sequence can be represented as a binary tree. Each left hand child is produced as A019565(n), and each right hand child as A065642(n), when the parent node contains n >= 2:
1
|
...................2...................
3 4
6......../ \........9 5......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
15 12 14 27 10 25 7 16
210 45 35 18 105 28 462 81 21 20 154 125 30 49 11 32
etc.
Where will 38 appear in this tree? It is a reasonable assumption that by iterating A087207 starting from 38, as A087207(38) = 129, A087207(129) = 8194, A087207(8194) = 1501199875790187, ..., we will eventually hit a prime A000040(k), most likely with a largish index k. This prime occurs at the penultimate edge at right, as a(A000918(k)) = a((2^k)-2), and thus 38 occurs somewhere below it as a(m) = 38, m > k. All the numbers that share prime factors with 38, namely 76, 152, 304, 608, 722, ..., occur similarly late in this tree, as they form the rightward branch starting from 38. Alternatively, by iterating A285330 (each iteration moves one step towards the root) starting from 38, we might instead first hit some power of 3, or say, one of the terms of A033845 (the rightward branch starting from 6), in which case the first prime encountered would be a(2)=3 and 38 would appear on the left-hand side instead of the right-hand side subtree.
As long as it remains conjecture that A019565 has no cycles, it is certainly also an open question whether this is a permutation of the natural numbers: If A019565 has any cycles, then neither any of the terms in those cycles nor any A065642-trajectories starting from those terms (that is, numbers sharing same prime factors) may occur in this tree.
Sequence exhibits some outrageous swings, for example, a(703) = 224, but a(704) is 1427 decimal digits (4739 binary digits) long, thus it no longer fits into a b-file.
However, the scatter plot of A286543 gives some flavor of the behavior of this sequence even after that point. - Antti Karttunen, Dec 25 2017
LINKS
Michael De Vlieger, Diagram of the binary tree of a(n) showing 1 <= n <= 2^8.
Antti Karttunen and David J. Seal, Discussion on SeqFan mailing list
FORMULA
a(0) = 1, a(1) = 2, a(2n) = A019565(a(n)), a(2n+1) = A065642(a(n)).
For n >= 0, a(2^n) = A109162(2+n). [The left edge of the tree.]
For n >= 0, a(A000225(n)) = A000079(n). [Powers of 2 occur at the right edge of the tree.]
For n >= 2, a(A000918(n)) = A000040(n). [And the next vertices inwards contain primes.]
For n >= 2, a(A036563(1+n)) = A001248(n). [Whose right children are their squares.]
For n >= 0, a(A055010(n)) = A000244(n). [Powers of 3 are at the rightmost edge of the left subtree.]
For n >= 2, a(A129868(n-1)) = A062457(n).
A048675(a(n)) = A285333(n).
A046523(a(n)) = A286542(n).
MATHEMATICA
Block[{a = {1, 2}}, Do[AppendTo[a, If[EvenQ[i], Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[a[[i/2 + 1]], 2], If[# == 1, 1, Function[{n, c}, SelectFirst[Range[n + 1, n^2], Times @@ FactorInteger[#][[All, 1]] == c &]] @@ {#, Times @@ FactorInteger[#][[All, 1]]}] &[a[[(i - 1)/2 + 1]] ] ]], {i, 2, 70}]; a] (* Michael De Vlieger, Mar 12 2021 *)
PROG
(PARI)
A019565(n) = {my(j, v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
A065642(n) = { my(r=A007947(n)); if(1==n, n, n = n+r; while(A007947(n) <> r, n = n+r); n); };
A285332(n) = { if(n<=1, n+1, if(!(n%2), A019565(A285332(n/2)), A065642(A285332((n-1)/2)))); };
for(n=0, 4095, write("b285332.txt", n, " ", A285332(n)));
(Scheme, with memoization-macro definec)
(definec (A285332 n) (cond ((<= n 1) (+ n 1)) ((even? n) (A019565 (A285332 (/ n 2)))) (else (A065642 (A285332 (/ (- n 1) 2))))))
(Python)
from operator import mul
from sympy import prime, primefactors
def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1 # This function from Chai Wah Wu
def a065642(n):
if n==1: return 1
r=a007947(n)
n = n + r
while a007947(n)!=r:
n+=r
return n
def a(n):
if n<2: return n + 1
if n%2==0: return a019565(a(n//2))
else: return a065642(a((n - 1)//2))
print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 18 2017
CROSSREFS
Inverse: A285331.
Compare also to permutation A285112 and array A285321.
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Apr 17 2017
STATUS
approved
If A327928(n) > 0, a(n) = A276086(n), otherwise a(n) = A003415(n).
+10
9
0, 1, 1, 9, 1, 5, 1, 15, 6, 7, 1, 25, 1, 9, 150, 225, 1, 21, 1, 375, 10, 13, 1, 625, 10, 15, 3750, 5625, 1, 31, 1, 21, 14, 19, 126, 35, 1, 21, 210, 315, 1, 41, 1, 525, 39, 25, 1, 875, 14, 45, 5250, 7875, 1, 4375, 8750, 13125, 22, 31, 1, 49, 1, 33, 51, 441, 18, 61, 1, 735, 26, 59, 1, 1225, 1, 39, 55, 11025, 18, 71, 1, 18375, 36750, 43, 1, 30625, 22, 45
OFFSET
1,4
COMMENTS
After zero, sequence contains only terms of A048103.
FORMULA
If A327928(n) > 0 [when n is one of the terms in A327929], then a(n) = A276086(n), otherwise a(n) = A003415(n).
For n > 1, a(n) = A276086(A327964(n)).
PROG
(PARI)
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A129251(n) = { my(f = factor(n)); sum(k=1, #f~, (f[k, 2]>=f[k, 1])); };
A276086(n) = { my(i=0, m=1, pr=1, nextpr); while((n>0), i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m*=(prime(i)^((n%nextpr)/pr)); n-=(n%nextpr)); pr=nextpr); m; };
A327963(n) = if(1==n, 0, my(u=A003415(n)); if(!A129251(u), u, A276086(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2019
STATUS
approved
a(n) = A048675(A285332(n)).
+10
7
0, 1, 2, 2, 3, 4, 4, 3, 6, 4, 9, 6, 5, 8, 8, 4, 15, 8, 12, 5, 14, 10, 27, 8, 10, 6, 25, 12, 7, 16, 16, 5, 210, 16, 45, 10, 35, 16, 18, 5, 105, 16, 28, 11, 462, 28, 81, 10, 21, 12, 20, 7, 154, 26, 125, 16, 30, 8, 49, 24, 11, 32, 32, 6, 10659, 212, 420, 17, 910, 46, 75, 10, 78, 36, 175, 20, 33, 20, 24, 6, 3094, 106, 315, 18, 385, 32, 56, 17, 780045
OFFSET
0,3
COMMENTS
Following A285332, also this sequence can be represented in a form of a binary tree:
0
|
...................1...................
2 2
3......../ \........4 4......../ \........3
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
6 4 9 6 5 8 8 4
15 8 12 5 14 10 27 8 10 6 25 12 7 16 16 5
etc.
LINKS
FORMULA
a(n) = A048675(A285332(n)).
For all n >= 1, a(2n) = A285332(n).
a(2^n) = A109162(1+n). [The left edge of the tree.]
a(A000225(n)) = n. [The right edge of tree.]
PROG
(PARI)
A019565(n) = {my(j, v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ Michel Marcus, Oct 10 2016
A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
A065642(n) = { my(r=A007947(n)); if(1==n, n, n = n+r; while(A007947(n) <> r, n = n+r); n); };
A285332(n) = { if(n<=1, n+1, if(!(n%2), A019565(A285332(n/2)), A065642(A285332((n-1)/2)))); };
A285333(n) = if(!n, n, if(!(n%2), A285332(n/2), A048675(A285332(n))));
(Scheme) (define (A285333 n) (A048675 (A285332 n)))
CROSSREFS
Cf. A001477, A048675, A109162, A285325, A285330, A285332 (even bisection).
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Apr 19 2017
STATUS
approved
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
OFFSET
1,2
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:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A039636(i) = A039636(j).
For all i, j: a(i) = a(j) <=> A323161(i+1) = A323161(j+1).
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
FORMULA
a(n) = A323161(n+1) - 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; };
A322809aux(n) = if((n>2)&&isprime(n), -1, (n>>1));
v322809 = rgs_transform(vector(up_to, n, A322809aux(n)));
A322809(n) = v322809[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:
A322809 (A004526, unless an odd prime) [This sequence],
A322589 (A007913, unless an odd prime),
A322591 (A007947, unless an odd prime),
A322805 (A252463, unless an odd prime),
A323082 (A300840, unless an odd prime),
A322822 (A300840, unless n > 2 and a Fermi-Dirac prime, A050376),
A322988 (A322990, unless a prime power > 2),
A323078 (A097246, unless an odd prime),
A322808 (A097246, unless a squarefree number > 2),
A322816 (A048675, unless an odd prime),
A322807 (A285330, unless an odd prime),
A322814 (A286621, unless an odd prime),
A322824 (A242424, unless an odd prime),
A322973 (A006370, unless an odd prime),
A322974 (A049820, unless n > 1 and n is in A046642),
A323079 (A060681, unless an odd prime),
A322587 (A295887, unless an odd prime),
A322588 (A291751, unless an odd prime),
A322592 (A289625, unless an odd prime),
A323369 (A323368, unless an odd prime),
A323371 (A295886, unless an odd prime),
A323374 (A323373, unless an odd prime),
A323401 (A323372, unless an odd prime),
A323405 (A323404, unless an odd prime).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 26 2018
STATUS
approved

Search completed in 0.012 seconds