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

A156552 Unary-encoded compressed factorization of natural numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 6, 9, 16, 11, 32, 17, 10, 15, 64, 13, 128, 19, 18, 33, 256, 23, 12, 65, 14, 35, 512, 21, 1024, 31, 34, 129, 20, 27, 2048, 257, 66, 39, 4096, 37, 8192, 67, 22, 513, 16384, 47, 24, 25, 130, 131, 32768, 29, 36, 71, 258, 1025, 65536, 43, 131072, 2049, 38, 63, 68, 69, 262144
Offset: 1

Views

Author

Leonid Broukhis, Feb 09 2009

Keywords

Comments

The primes become the powers of 2 (2 -> 1, 3 -> 2, 5 -> 4, 7 -> 8); the composite numbers are formed by taking the values for the factors in the increasing order, multiplying them by the consecutive powers of 2, and summing. See the Example section.
From Antti Karttunen, Jun 27 2014: (Start)
The odd bisection (containing even terms) halved gives A244153.
The even bisection (containing odd terms), when one is subtracted from each and halved, gives this sequence back.
(End)
Question: Are there any other solutions that would satisfy the recurrence r(1) = 0; and for n > 1, r(n) = Sum_{d|n, d>1} 2^A033265(r(d)), apart from simple variants 2^k * A156552(n)? See also A297112, A297113. - Antti Karttunen, Dec 30 2017

Examples

			For 84 = 2*2*3*7 -> 1*1 + 1*2 + 2*4 + 8*8 =  75.
For 105 = 3*5*7 -> 2*1 + 4*2 + 8*4 = 42.
For 137 = p_33 -> 2^32 = 4294967296.
For 420 = 2*2*3*5*7 -> 1*1 + 1*2 + 2*4 + 4*8 + 8*16 = 171.
For 147 = 3*7*7 = p_2 * p_4 * p_4 -> 2*1 + 8*2 + 8*4 = 50.
		

Crossrefs

One less than A005941.
Inverse permutation: A005940 with starting offset 0 instead of 1.
Cf. also A297106, A297112 (Möbius transform), A297113, A153013, A290308, A300827, A323243, A323244, A323247, A324201, A324812 (n for which a(n) is a square), A324813, A324822, A324823, A324398, A324713, A324815, A324819, A324865, A324866, A324867.

Programs

  • Mathematica
    Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ n]], {n, 67}] (* Michael De Vlieger, Sep 08 2016 *)
  • PARI
    a(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ David A. Corneth, Mar 08 2019
    
  • PARI
    A064989(n) = {my(f); 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)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n)))); \\ (based on the given recurrence) - Antti Karttunen, Mar 08 2019
    
  • Perl
    # Program corrected per instructions from Leonid Broukhis. - Antti Karttunen, Jun 26 2014
    # However, it gives correct answers only up to n=136, before corruption by a wrap-around effect.
    # Note that the correct answer for n=137 is A156552(137) = 4294967296.
    $max = $ARGV[0];
    $pow = 0;
    foreach $i (2..$max) {
    @a = split(/ /, `factor $i`);
    shift @a;
    $shift = 0;
    $cur = 0;
    while ($n = int shift @a) {
    $prime{$n} = 1 << $pow++ if !defined($prime{$n});
    $cur |= $prime{$n} << $shift++;
    }
    print "$cur, ";
    }
    print "\n";
    (Scheme, with memoization-macro definec from Antti Karttunen's IntSeq-library, two different implementations)
    (definec (A156552 n) (cond ((= n 1) 0) (else (+ (A000079 (+ -2 (A001222 n) (A061395 n))) (A156552 (A052126 n))))))
    (definec (A156552 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A156552 (/ n 2))))) (else (* 2 (A156552 (A064989 n))))))
    ;; Antti Karttunen, Jun 26 2014
    
  • Python
    from sympy import primepi, factorint
    def A156552(n): return sum((1<Chai Wah Wu, Mar 10 2023

Formula

From Antti Karttunen, Jun 26 2014: (Start)
a(1) = 0, a(n) = A000079(A001222(n)+A061395(n)-2) + a(A052126(n)).
a(1) = 0, a(2n) = 1+2*a(n), a(2n+1) = 2*a(A064989(2n+1)). [Compare to the entanglement recurrence A243071].
For n >= 0, a(2n+1) = 2*A244153(n+1). [Follows from the latter clause of the above formula.]
a(n) = A005941(n) - 1.
As a composition of related permutations:
a(n) = A003188(A243354(n)).
a(n) = A054429(A243071(n)).
For all n >= 1, A005940(1+a(n)) = n and for all n >= 0, a(A005940(n+1)) = n. [The offset-0 version of A005940 works as an inverse for this permutation.]
This permutations also maps between the partition-lists A112798 and A125106:
A056239(n) = A161511(a(n)). [The sums of parts of each partition (the total sizes).]
A003963(n) = A243499(a(n)). [And also the products of those parts.]
(End)
From Antti Karttunen, Oct 09 2016: (Start)
A161511(a(n)) = A056239(n).
A029837(1+a(n)) = A252464(n). [Binary width of terms.]
A080791(a(n)) = A252735(n). [Number of nonleading 0-bits.]
A000120(a(n)) = A001222(n). [Binary weight.]
For all n >= 2, A001511(a(n)) = A055396(n).
For all n >= 2, A000120(a(n))-1 = A252736(n). [Binary weight minus one.]
A252750(a(n)) = A252748(n).
a(A250246(n)) = A252754(n).
a(A005117(n)) = A277010(n). [Maps squarefree numbers to a permutation of A003714, fibbinary numbers.]
A085357(a(n)) = A008966(n). [Ditto for their characteristic functions.]
For all n >= 0:
a(A276076(n)) = A277012(n).
a(A276086(n)) = A277022(n).
a(A260443(n)) = A277020(n).
(End)
From Antti Karttunen, Dec 30 2017: (Start)
For n > 1, a(n) = Sum_{d|n, d>1} 2^A033265(a(d)). [See comments.]
More linking formulas:
A106737(a(n)) = A000005(n).
A290077(a(n)) = A000010(n).
A069010(a(n)) = A001221(n).
A136277(a(n)) = A181591(n).
A132971(a(n)) = A008683(n).
A106400(a(n)) = A008836(n).
A268411(a(n)) = A092248(n).
A037011(a(n)) = A010052(n) [conjectured, depends on the exact definition of A037011].
A278161(a(n)) = A046951(n).
A001316(a(n)) = A061142(n).
A277561(a(n)) = A034444(n).
A286575(a(n)) = A037445(n).
A246029(a(n)) = A181819(n).
A278159(a(n)) = A124859(n).
A246660(a(n)) = A112624(n).
A246596(a(n)) = A069739(n).
A295896(a(n)) = A053866(n).
A295875(a(n)) = A295297(n).
A284569(a(n)) = A072411(n).
A286574(a(n)) = A064547(n).
A048735(a(n)) = A292380(n).
A292272(a(n)) = A292382(n).
A244154(a(n)) = A048673(n), a(A064216(n)) = A244153(n).
A279344(a(n)) = A279339(n), a(A279338(n)) = A279343(n).
a(A277324(n)) = A277189(n).
A037800(a(n)) = A297155(n).
For n > 1, A033265(a(n)) = 1+A297113(n).
(End)
From Antti Karttunen, Mar 08 2019: (Start)
a(n) = A048675(n) + A323905(n).
a(A324201(n)) = A000396(n), provided there are no odd perfect numbers.
The following sequences are derived from or related to the base-2 expansion of a(n):
A000265(a(n)) = A322993(n).
A002487(a(n)) = A323902(n).
A005187(a(n)) = A323247(n).
A324288(a(n)) = A324116(n).
A323505(a(n)) = A323508(n).
A079559(a(n)) = A323512(n).
A085405(a(n)) = A323239(n).
The following sequences are obtained by applying to a(n) a function that depends on the prime factorization of its argument, which goes "against the grain" because a(n) is the binary code of the factorization of n, which in these cases is then factored again:
A000203(a(n)) = A323243(n).
A033879(a(n)) = A323244(n) = 2*a(n) - A323243(n),
A294898(a(n)) = A323248(n).
A000005(a(n)) = A324105(n).
A000010(a(n)) = A324104(n).
A083254(a(n)) = A324103(n).
A001227(a(n)) = A324117(n).
A000593(a(n)) = A324118(n).
A001221(a(n)) = A324119(n).
A009194(a(n)) = A324396(n).
A318458(a(n)) = A324398(n).
A192895(a(n)) = A324100(n).
A106315(a(n)) = A324051(n).
A010052(a(n)) = A324822(n).
A053866(a(n)) = A324823(n).
A001065(a(n)) = A324865(n) = A323243(n) - a(n),
A318456(a(n)) = A324866(n) = A324865(n) OR a(n),
A318457(a(n)) = A324867(n) = A324865(n) XOR a(n),
A318458(a(n)) = A324398(n) = A324865(n) AND a(n),
A318466(a(n)) = A324819(n) = A323243(n) OR 2*a(n),
A318467(a(n)) = A324713(n) = A323243(n) XOR 2*a(n),
A318468(a(n)) = A324815(n) = A323243(n) AND 2*a(n).
(End)

Extensions

More terms from Antti Karttunen, Jun 28 2014

A297167 a(1) = 0, for n > 1, a(n) = -1 + the excess of n (A046660) + the index of the largest prime factor (A061395).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 3, 2, 2, 2, 4, 2, 5, 3, 2, 3, 6, 2, 7, 3, 3, 4, 8, 3, 3, 5, 3, 4, 9, 2, 10, 4, 4, 6, 3, 3, 11, 7, 5, 4, 12, 3, 13, 5, 3, 8, 14, 4, 4, 3, 6, 6, 15, 3, 4, 5, 7, 9, 16, 3, 17, 10, 4, 5, 5, 4, 18, 7, 8, 3, 19, 4, 20, 11, 3, 8, 4, 5, 21, 5, 4, 12, 22, 4, 6, 13, 9, 6, 23, 3, 5, 9, 10, 14, 7, 5, 24, 4, 5, 4, 25, 6, 26, 7, 3
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Array[-1 + PrimeOmega@ # - PrimeNu@ # + PrimePi[FactorInteger[#][[-1, 1]]] /. k_ /; k < 0 -> 0 &, 105] (* or, slightly faster *)
    Array[-1 + Length@ # - Length@ Union@ # + PrimePi@ Last@ # /. k_ /; k < 0 -> 0 &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, #] &@ FactorInteger[#] &, 105] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
    A252464(n) = if(1==n, 0, (bigomega(n) + A061395(n) - 1));
    A297167(n) = (A252464(n) - omega(n));
    \\ Or just as:
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    \\ Antti Karttunen, Mar 13 2018
    
  • Python
    from sympy import factorint, primepi
    def A297167(n): return primepi(max(f:=factorint(n)))+sum(e-1 for e in f.values())-1 if n>1 else 0 # Chai Wah Wu, Jul 29 2023
  • Scheme
    (define (A297167 n) (- (A252464 n) (A001221 n)))
    

Formula

a(n) = A252464(n) - A001221(n).
For n > 1, a(n) = A033265(A156552(n)) = A297113(n) - 1.
For n > 1, a(n) = A046660(n) + A061395(n) - 1. - Antti Karttunen, Mar 13 2018

Extensions

Name changed, original equivalent definition is the first entry in the Formula section - Antti Karttunen, Mar 13 2018

A297168 Difference between A156552 and its Moebius transform: a(n) = A156552(n) - A297112(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 3, 2, 5, 0, 7, 0, 9, 6, 7, 0, 9, 0, 11, 10, 17, 0, 15, 4, 33, 6, 19, 0, 17, 0, 15, 18, 65, 12, 19, 0, 129, 34, 23, 0, 29, 0, 35, 14, 257, 0, 31, 8, 17, 66, 67, 0, 21, 20, 39, 130, 513, 0, 35, 0, 1025, 22, 31, 36, 53, 0, 131, 258, 33, 0, 39, 0, 2049, 18, 259, 24, 101, 0, 47, 14, 4097, 0, 59, 68, 8193, 514, 71, 0, 37, 40
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2018

Keywords

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Total@ MapIndexed[#1 2^(First@ #2 - 1) &, Flatten@ Map[ConstantArray[2^(PrimePi@ #1 - 1), #2] & @@ # &, FactorInteger@ #]] - Boole[# == 1]/2 &, 91]}, Table[-DivisorSum[n, MoebiusMu[n/#] s[[#]] &, # < n &], {n, Length@ s}]] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    A064989(n) = {my(f); 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)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    A297112(n) = sumdiv(n,d,moebius(n/d)*A156552(d));
    A297168(n) = (A156552(n)-A297112(n));
    \\ Or alternatively as:
    A297168(n) = -sumdiv(n,d,(dA156552(d));
    
  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A297112(n) = if(1==n,0,2^A297167(n));
    A297168(n) = sumdiv(n,d,(dA297112(d)); \\ Antti Karttunen, Mar 13 2018
    
  • Scheme
    (define (A297168 n) (- (A156552 n) (A297112 n)))
    (define (A297168 n) (if (= 1 n) 0 (- (A156552 n) (A000079 (A297167 n)))))

Formula

a(n) = -Sum_{d|n, dA008683(n/d)*A156552(d).
a(n) = Sum_{d|n, dA297112(d).
For n > 1, a(n) = Sum_{d|n, 1A033265(A156552(d)).
a(n) = A156552(n) - A297112(n).
a(1) = 0, for n > 1, a(n) = A156552(n) - 2^A297167(n).

A324181 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324180(n) for n > 1 and f(1) = -1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 5, 6, 2, 4, 2, 7, 8, 9, 2, 6, 2, 4, 10, 11, 2, 4, 12, 13, 8, 4, 2, 6, 2, 14, 15, 16, 17, 9, 2, 18, 19, 14, 2, 7, 2, 4, 8, 20, 2, 4, 21, 7, 22, 4, 2, 7, 23, 24, 25, 26, 2, 14, 2, 27, 8, 28, 29, 11, 2, 4, 30, 7, 2, 4, 2, 31, 10, 4, 32, 13, 2, 24, 33, 34, 2, 24, 35, 36, 37, 38, 2, 7, 39, 4, 40, 41, 42, 4, 2, 11, 8, 43, 2, 16, 2, 44, 10
Offset: 1

Views

Author

Antti Karttunen, Feb 19 2019

Keywords

Comments

For all i, j: a(i) = a(j) => A324120(i) = A324120(j).

Crossrefs

Cf. A000040 (positions of 2's), A156552, A297112, A324120, A324180.
Cf. also A300827, A323914, A324203.

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; };
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A297112(n) = if(1==n, 0, 2^A297167(n));
    A324180(n) = { my(v=0); fordiv(n, d, if(dA297112(d)))); (v); };
    Aux324181(n) = if((1==n),-n,A324180(n));
    v324181 = rgs_transform(vector(up_to, n, Aux324181(n)));
    A324181(n) = v324181[n];

A324203 Lexicographically earliest sequence such that a(i) = a(j) => A324202(i) = A324202(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 6, 2, 4, 4, 7, 2, 8, 2, 9, 4, 4, 2, 10, 3, 4, 5, 9, 2, 11, 2, 12, 4, 4, 4, 13, 2, 4, 4, 14, 2, 11, 2, 9, 6, 4, 2, 15, 3, 8, 4, 9, 2, 16, 4, 17, 4, 4, 2, 18, 2, 4, 9, 19, 4, 11, 2, 9, 4, 11, 2, 20, 2, 4, 8, 9, 4, 11, 2, 21, 7, 4, 2, 20, 4, 4, 4, 17, 2, 22, 4, 9, 4, 4, 4, 23, 2, 8, 9, 24, 2, 11, 2, 17, 11
Offset: 1

Views

Author

Antti Karttunen, Feb 19 2019

Keywords

Comments

Restricted growth sequence transform of A324202.
For all i, j:
a(i) = a(j) => A324190(i) = A324190(j),
a(i) = a(j) => A324191(i) = A324191(j).

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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A324202(n) = A046523(factorback(apply(x -> prime(1+x),apply(A297167, select(d -> d>1,divisors(n))))));
    v324203 = rgs_transform(vector(up_to, n, A324202(n)));
    A324203(n) = v324203[n];

A297169 Restricted growth sequence transform of a(1) = -1, a(n) = A297168(n) for n > 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 5, 6, 2, 7, 2, 8, 9, 7, 2, 8, 2, 10, 11, 12, 2, 13, 14, 15, 9, 16, 2, 12, 2, 13, 17, 18, 19, 16, 2, 20, 21, 22, 2, 23, 2, 24, 25, 26, 2, 27, 28, 12, 29, 30, 2, 31, 32, 33, 34, 35, 2, 24, 2, 36, 37, 27, 38, 39, 2, 40, 41, 15, 2, 33, 2, 42, 17, 43, 44, 45, 2, 46, 25, 47, 2, 48, 49, 50, 51, 52, 2, 53, 54, 55, 56, 57, 58, 59, 2, 15, 60, 24
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2018

Keywords

Comments

For all i, j: A300827(i) = A300827(j) => a(i) = a(j). - Antti Karttunen, Mar 13 2018

Crossrefs

Programs

  • PARI
    allocatemem(2^30);
    up_to = 8192;
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A297112(n) = if(1==n,0,2^A297167(n));
    A297168v1(n) = if(1==n,-1,sumdiv(n,d,(dA297112(d)));
    write_to_bfile(1,rgs_transform(vector(up_to,n,A297168v1(n))),"b297169.txt");
    \\ (More efficient PARI program) - Antti Karttunen, Mar 13 2018

A324193 a(1) = 0; for n > 1, a(n) = Product_{d|n, d>1, dA297167(d)).

Original entry on oeis.org

0, 1, 1, 2, 1, 6, 1, 6, 3, 10, 1, 54, 1, 14, 15, 30, 1, 90, 1, 150, 21, 22, 1, 1350, 5, 26, 15, 294, 1, 2250, 1, 210, 33, 34, 35, 6750, 1, 38, 39, 5250, 1, 6174, 1, 726, 375, 46, 1, 66150, 7, 350, 51, 1014, 1, 3150, 55, 16170, 57, 58, 1, 1181250, 1, 62, 735, 2310, 65, 23958, 1, 1734, 69, 17150, 1, 1653750, 1, 74, 525, 2166, 77, 39546, 1, 404250, 105
Offset: 1

Views

Author

Antti Karttunen, Feb 20 2019

Keywords

Comments

An auxiliary sequence for defining A300827, which is the restricted growth sequence transform of this sequence. A324202 is a similar sequence, but is not limited to the proper divisors of n, and in contrast to this, also finds the least prime signature representative (A046523) of the product formed.

Crossrefs

Cf. also A324202.

Programs

  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A324193(n) = { my(m=1); if(n<=2, n-1, fordiv(n, d, if((d>1)&(dA297167(d)))); (m)); };

Formula

a(1) = 0; for n > 1, a(n) = Product_{d|n, d>1, dA297167(d)).
For all n > 0:
A001222(a(n)) = A000005(n)-2.
A001221(A007913(a(n))) = A324120(n).
A087207(A007913(a(n))) = A324180(n).

A324537 a(n) = A003557(k), where k = Product_{d|n, d>2} prime(A297167(d)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 4, 1, 5, 3, 1, 1, 6, 1, 3, 5, 7, 1, 12, 1, 11, 1, 5, 1, 54, 1, 1, 7, 13, 5, 36, 1, 17, 11, 9, 1, 250, 1, 7, 9, 19, 1, 60, 1, 15, 13, 11, 1, 30, 7, 5, 17, 23, 1, 1620, 1, 29, 5, 1, 11, 686, 1, 13, 19, 375, 1, 540, 1, 31, 15, 17, 7, 2662, 1, 45, 1, 37, 1, 3500, 13, 41, 23, 7, 1, 2430, 11, 19, 29, 43, 17, 420, 1, 35, 7, 75, 1
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Crossrefs

Cf. A000961 (positions of ones), A003557, A297167, A300827, A324191, A324193, A324202, A324538.

Programs

  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557
    A324537(n) = { my(m=1); fordiv(n, d, if(d>2, m *= prime(A297167(d)))); A003557(m); };

Formula

A001222(a(n)) = A324191(n) - 1.

A324538 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324537(n) for all other numbers, except f(1) = 0.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 5, 2, 6, 4, 2, 2, 7, 2, 4, 6, 8, 2, 9, 2, 10, 2, 6, 2, 11, 2, 2, 8, 12, 6, 13, 2, 14, 10, 15, 2, 16, 2, 8, 15, 17, 2, 18, 2, 19, 12, 10, 2, 20, 8, 6, 14, 21, 2, 22, 2, 23, 6, 2, 10, 24, 2, 12, 17, 25, 2, 26, 2, 27, 19, 14, 8, 28, 2, 29, 2, 30, 2, 31, 12, 32, 21, 8, 2, 33, 10, 17, 23, 34, 14, 35, 2, 36, 8, 37, 2, 38, 2, 10, 25
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Comments

For all i, j:
a(i) = a(j) => A069513(i) = A069513(j),
a(i) = a(j) => A324191(i) = A324191(j).

Crossrefs

Cf. A000961 (positions of terms <= 2), A069513, A297167, A324191, A324537.

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; };
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557
    A324537(n) = { my(m=1); fordiv(n, d, if(d>2, m *= prime(A297167(d)))); A003557(m); };
    Aux324538(n) = if(1==n,0,A324537(n));
    v324538 = rgs_transform(vector(up_to,n,Aux324538(n)));
    A324538(n) = v324538[n];

A300716 a(1) = 0; for n > 1, a(n) = Product_{d|n, 1A101296(d)-1).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 6, 2, 4, 1, 60, 1, 4, 4, 42, 1, 60, 1, 60, 4, 4, 1, 4620, 2, 4, 6, 60, 1, 1000, 1, 546, 4, 4, 4, 21780, 1, 4, 4, 4620, 1, 1000, 1, 60, 60, 4, 1, 1021020, 2, 60, 4, 60, 1, 4620, 4, 4620, 4, 4, 1, 6897000, 1, 4, 60, 12558, 4, 1000, 1, 60, 4, 1000, 1, 75162780, 1, 4, 60, 60, 4, 1000, 1, 1021020, 42, 4, 1
Offset: 1

Views

Author

Antti Karttunen, Mar 13 2018

Keywords

Comments

a(n) = Product formed from the primes indexed with the prime signatures of proper divisors of n.
The restricted growth sequence transform of this sequence is A101296 because from the set of prime signatures of the proper divisors of n it is always possible to determine the prime signature of n itself, and vice versa, from the prime signature of n, we can form the set of prime signatures of all its proper divisors.
For all i, j: a(i) = a(j) <=> A101296(i) = A101296(j).

Examples

			For n = 12, whose proper divisors > 1 are 2, 3, 4, 6, their prime signature ranks from A101296 are: 2, 2, 3, 4. We subtract one from each, to form product prime(1)*prime(1)*prime(2)*prime(3) = 2*2*3*5 = 60, which is thus value of a(12).
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 83, s}, s = Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Times @@ MapIndexed[Prime[First@#2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1], {n, nn}]; Table[If[n == 1, 0, Times @@ Map[Prime[FirstPosition[Keys@ s, #][[1]] - 1] &, Most@ Rest@ Divisors@ n]], {n, nn}]] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    up_to = 8192;
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v101296 = rgs_transform(vector(up_to, n, A046523(n)));
    A101296(n) = v101296[n];
    A300716(n) = { my(m=1); if(1==n, 0, fordiv(n,d,if((d>1)&(dA101296(d)-1))); (m)); };
    for(n=1,up_to,write("b300716.txt", n, " ", A300716(n)));
Showing 1-10 of 10 results.