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

A320012 Filter sequence combined from those proper divisors d of n for which 2 == d (mod 3); Restricted growth sequence transform of A319992.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A320005(i) = A320005(j),
a(i) = a(j) => A293898(i) = A293898(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; };
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A319992(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    v320012 = rgs_transform(vector(up_to,n,A319992(n)));
    A320012(n) = v320012[n];

A048675 If n = p_i^e_i * ... * p_k^e_k, p_i < ... < p_k primes (with p_i = prime(i)), then a(n) = (1/2) * (e_i * 2^i + ... + e_k * 2^k).

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 4, 5, 16, 4, 32, 9, 6, 4, 64, 5, 128, 6, 10, 17, 256, 5, 8, 33, 6, 10, 512, 7, 1024, 5, 18, 65, 12, 6, 2048, 129, 34, 7, 4096, 11, 8192, 18, 8, 257, 16384, 6, 16, 9, 66, 34, 32768, 7, 20, 11, 130, 513, 65536, 8, 131072, 1025, 12, 6, 36, 19
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

The original motivation for this sequence was to encode the prime factorization of n in the binary representation of a(n), each such representation being unique as long as this map is restricted to A005117 (squarefree numbers, resulting a permutation of nonnegative integers A048672) or any of its subsequence, resulting an injective function like A048623 and A048639.
However, also the restriction to A260443 (not all terms of which are squarefree) results a permutation of nonnegative integers, namely A001477, the identity permutation.
When a polynomial with nonnegative integer coefficients is encoded with the prime factorization of n (e.g., as in A206296, A260443), then a(n) gives the evaluation of that polynomial at x=2.
The primitive completely additive integer sequence that satisfies a(n) = a(A225546(n)), n >= 1. By primitive, we mean that if b is another such sequence, then there is an integer k such that b(n) = k * a(n) for all n >= 1. - Peter Munn, Feb 03 2020
If the binary rank of an integer partition y is given by Sum_i 2^(y_i-1), and the Heinz number is Product_i prime(y_i), then a(n) is the binary rank of the integer partition with Heinz number n. Note the function taking a set s to Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices), and the function taking a multiset m to Product_i prime(m_i) is the inverse of A112798 (prime indices). - Gus Wiseman, May 22 2024

Examples

			From _Gus Wiseman_, May 22 2024: (Start)
The A018819(7) = 6 cases of binary rank 7 are the following, together with their prime indices:
   30: {1,2,3}
   40: {1,1,1,3}
   54: {1,2,2,2}
   72: {1,1,1,2,2}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
(End)
		

Crossrefs

Row 2 of A104244.
Similar logarithmic functions: A001414, A056239, A090880, A289506, A293447.
Left inverse of the following sequences: A000079, A019565, A038754, A068911, A134683, A260443, A332824.
A003961, A028234, A032742, A055396, A064989, A067029, A225546, A297845 are used to express relationship between terms of this sequence.
Cf. also A048623, A048676, A099884, A277896 and tables A277905, A285325.
Cf. A297108 (Möbius transform), A332813 and A332823 [= a(n) mod 3].
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000203,A331750), (A005940,A087808), (A007913,A248663), (A007947,A087207), (A097248,A048675), (A206296,A000129), (A248692,A056239), (A283477,A005187), (A284003,A006068), (A285101,A028362), (A285102,A068052), (A293214,A001065), (A318834,A051953), (A319991,A293897), (A319992,A293898), (A320017,A318674), (A329352,A069359), (A332461,A156552), (A332462,A156552), (A332825,A000010) and apparently (A163511,A135529).
See comments/formulas in A277333, A331591, A331740 giving their relationship to this sequence.
The formula section details how the sequence maps the terms of A329050, A329332.
A277892, A322812, A322869, A324573, A324575 give properties of the n-th term of this sequence.
The term k appears A018819(k) times.
The inverse transformation is A019565 (Heinz number of binary indices).
The version for distinct prime indices is A087207.
Numbers k such that a(k) is prime are A277319, counts A372688.
Grouping by image gives A277905.
A014499 lists binary indices of prime numbers.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc. - this is also A049084.
    A048675 := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end;
    # simpler alternative
    f:= n -> add(2^(numtheory:-pi(t[1])-1)*t[2], t=ifactors(n)[2]):
    map(f, [$1..100]); # Robert Israel, Oct 10 2016
  • Mathematica
    a[1] = 0; a[n_] := Total[ #[[2]]*2^(PrimePi[#[[1]]]-1)& /@ FactorInteger[n] ]; Array[a, 100] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    a(n) = my(f = factor(n)); sum(k=1, #f~, f[k,2]*2^primepi(f[k,1]))/2; \\ Michel Marcus, Oct 10 2016
    
  • PARI
    \\ The following program reconstructs terms (e.g. for checking purposes) from the factorization file prepared by Hans Havermann:
    v048675sigs = readvec("a048675.txt");
    A048675(n) = if(n<=2,n-1,my(prsig=v048675sigs[n],ps=prsig[1],es=prsig[2]); prod(i=1,#ps,ps[i]^es[i])); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        if n==1: return 0
        f=factorint(n)
        return sum([f[i]*2**(primepi(i) - 1) for i in f])
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 19 2017

Formula

a(1) = 0, a(n) = 1/2 * (e1*2^i1 + e2*2^i2 + ... + ez*2^iz) if n = p_{i1}^e1*p_{i2}^e2*...*p_{iz}^ez, where p_i is the i-th prime. (e.g. p_1 = 2, p_2 = 3).
Totally additive with a(p^e) = e * 2^(PrimePi(p)-1), where PrimePi(n) = A000720(n). [Missing factor e added to the comment by Antti Karttunen, Jul 29 2015]
From Antti Karttunen, Jul 29 2015: (Start)
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A032742(n)). [Where A055396(n) gives the index of the smallest prime dividing n and A032742(n) gives the largest proper divisor of n.]
a(1) = 0; for n > 1, a(n) = (A067029(n) * (2^(A055396(n)-1))) + a(A028234(n)).
Other identities. For all n >= 0:
a(A019565(n)) = n.
a(A260443(n)) = n.
a(A206296(n)) = A000129(n).
a(A005940(n+1)) = A087808(n).
a(A007913(n)) = A248663(n).
a(A007947(n)) = A087207(n).
a(A283477(n)) = A005187(n).
a(A284003(n)) = A006068(n).
a(A285101(n)) = A028362(1+n).
a(A285102(n)) = A068052(n).
Also, it seems that a(A163511(n)) = A135529(n) for n >= 1. (End)
a(1) = 0, a(2n) = 1+a(n), a(2n+1) = 2*a(A064989(2n+1)). - Antti Karttunen, Oct 11 2016
From Peter Munn, Jan 31 2020: (Start)
a(n^2) = a(A003961(n)) = 2 * a(n).
a(A297845(n,k)) = a(n) * a(k).
a(n) = a(A225546(n)).
a(A329332(n,k)) = n * k.
a(A329050(n,k)) = 2^(n+k).
(End)
From Antti Karttunen, Feb 02-25 2020, Feb 01 2021: (Start)
a(n) = Sum_{d|n} A297108(d) = Sum_{d|A225546(n)} A297108(d).
a(n) = a(A097248(n)).
For n >= 2:
A001221(a(n)) = A322812(n), A001222(a(n)) = A277892(n).
A000203(a(n)) = A324573(n), A033879(a(n)) = A324575(n).
For n >= 1, A331750(n) = a(A000203(n)).
For n >= 1, the following chains hold:
A293447(n) >= a(n) >= A331740(n) >= A331591(n).
a(n) >= A087207(n) >= A248663(n).
(End)
a(n) = A087207(A097248(n)). - Flávio V. Fernandes, Jul 16 2025

Extensions

Entry revised by Antti Karttunen, Jul 29 2015
More linking formulas added by Antti Karttunen, Apr 18 2017

A319991 a(n) = Product_{d|n, dA019565(d)^[1 == d mod 3].

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 10, 2, 60, 2, 10, 2, 2, 2, 210, 60, 2, 2, 10, 2, 140, 2, 300, 2, 42, 2, 110, 2, 2, 60, 10, 2, 132, 140, 210, 2, 60, 2, 1650, 2, 2, 2, 110, 60, 6468, 2, 700, 2, 2, 2, 115500, 132, 2, 2, 210, 2, 4620, 60, 110, 140, 330, 2, 390, 2, 1260, 2, 10, 2, 260, 308, 660, 60, 140, 2, 210210, 2, 2, 2, 115500, 2, 1092, 2
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Crossrefs

Cf. also A293221.

Programs

  • 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
    A319991(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };

Formula

a(n) = Product_{d|n, dA019565(d)^[1 == d mod 3].
a(n) = A293214(n) / (A319990(n)*A319992(n)).
For all n >= 1:
A007814(a(n)) = A320001(n).
A048675(a(n)) = A293897(n).
A195017(a(n)) = A293895(n) mod 3.

A320005 Number of proper divisors of n of the form 6*k + 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 2
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, # < n && Mod[#, 6] == 5 &]; Array[a, 100] (* Amiram Eldar, Nov 25 2023 *)
  • PARI
    A320005(n) = if(!n,n,sumdiv(n, d, (d
    				

Formula

a(n) = A319995(n) - [+5 = n (mod 6)], where [ ] is the Iverson bracket, giving 1 only when n = -1 mod 6, and 0 otherwise.
a(n) = A320015(n) - A320001(n).
a(n) = A007814(A319992(n)).
G.f.: Sum_{k>=1} x^(12*k-2) / (1 - x^(6*k-1)). - Ilya Gutkovskiy, Apr 14 2021
Sum_{k=1..n} a(k) = n*log(n)/6 + c*n + O(n^(1/3)*log(n)), where c = gamma(5,6) - (2 - gamma)/6 = -0.387302..., gamma(5,6) = -(psi(5/6) + log(6))/6 is a generalized Euler constant, and gamma is Euler's constant (A001620) (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023

A319990 a(n) = Product_{d|n, dA019565(d)^[0 == d mod 3].

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 6, 1, 1, 90, 1, 1, 6, 1, 1, 1260, 1, 1, 6, 1, 1, 3150, 1, 1, 84, 1, 1, 18900, 1, 1, 6, 1, 1, 1455300, 1, 1, 6, 1, 1, 9900, 1, 1, 17640, 1, 1, 242550, 1, 1, 6, 1, 1, 19209960, 1, 1, 6, 1, 1, 764032500, 1, 1, 9240, 1, 1, 2340, 1, 1, 6, 1, 1, 7283776500, 1, 1, 1260, 1, 1, 35100, 1, 1, 38808, 1, 1, 94594500, 1, 1, 6, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Crossrefs

Cf. A293214, A319991, A319992, A320003, A320010 (rgs-transform).

Programs

  • PARI
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A319990(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };

Formula

a(n) = Product_{d|n, dA019565(d)^[0 == d mod 3].
a(n) = A293214(n) / (A319991(n)*A319992(n)).
For all n >= 1:
A007814(a(n)) = A320003(n).
A195017(a(n)) = 0 mod 3.

A320014 Filter sequence combining the binary expansions of proper divisors of n, grouped by their residue classes mod 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Comments

Restricted growth sequence transform of triple [A319990(n), A319991(n), A319992(n)], or equally, of ordered pair [A320010(n), A320013(n)].
Apart from trivial cases of primes, all other duplicates in range 1 .. 65537 seem to be squarefree semiprimes of the form 3k+1, i.e., both prime factors are either of the form 3k+1 or of the form 3k+2. Question: Is there any reason that more complicated cases would not occur later?
For all i, j: a(i) = a(j) => A293215(i) = A293215(j).
Differs from A319693 first for n = 108. - Georg Fischer, Oct 16 2018

Examples

			The first set of numbers that forms a nontrivial equivalence class is [295, 583, 799, 943] = [5*59, 11*53, 17*47, 23*41]. The prime factors in these are all of the form 3k+2, and when the binary expansions of the factors (like e.g., "101" for 5 and "111011" for 59 or "10111" for 23 and "101001" for 41) are overlaid, the resulting bit vector is always [1, 1, 1, 1, 1, 1^2], with the least significant bit-position containing 2 copies of 1's. Thus we have a(295) = a(583) = a(799) = a(943).
		

Crossrefs

Differs from A305800 for the first time at n=583, where a(583) = 234, while A305800(478).

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; };
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A319990(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    A319991(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    A319992(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    v320014 = rgs_transform(vector(up_to,n,[A319990(n),A319991(n),A319992(n)]));
    A320014(n) = v320014[n];

A320013 Filter sequence constructed from the binary expansions of those proper divisors of n that are not multiples of 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 03 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A319991(n), A319992(n)].
For all i, j: a(i) = a(j) => A320015(i) = A320015(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; };
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A319991(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    A319992(n) = { my(m=1); fordiv(n,d,if((dA019565(d))); m; };
    v320013 = rgs_transform(vector(up_to,n,[A319991(n),A319992(n)]));
    A320013(n) = v320013[n];
Showing 1-7 of 7 results.