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.

A347380 Length of the common prefix in the binary expansions of A156552(n) and A332221(n) = A156552(sigma(n)).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 4, 2, 3, 1, 1, 1, 3, 4, 1, 1, 2, 3, 1, 3, 1, 6, 2, 1, 1, 1, 2, 1, 3, 1, 8, 2, 4, 2, 3, 2, 5, 3, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 11, 2, 3, 1, 3, 1, 7, 3, 2, 1, 1, 1, 12, 7, 1, 2, 3, 3, 3, 3, 2, 3, 3, 3, 1, 4, 2, 2, 2, 2, 3, 3, 1, 1, 2, 2, 1, 1, 4, 1, 6, 1, 6, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2021

Keywords

Crossrefs

Programs

  • PARI
    Abincompreflen(n, m) = { my(x=binary(n),y=binary(m),u=min(#x,#y)); for(i=1,u,if(x[i]!=y[i],return(i-1))); (u);};
    A156552(n) = {my(f = factor(n), p, 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}; \\ From A156552
    A347380(n) = Abincompreflen(A156552(n), A156552(sigma(n)));

Formula

a(n) = A252464(n) - A347381(n).
a(n) = A348040(n, A000203(n)). - Antti Karttunen, Jan 30 2022

A332216 Fixed points of A332221: Numbers k such that A156552(sigma(k)) is equal to k.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 31, 47, 55, 79, 87, 127, 191, 383, 1279, 5119, 6143, 8191, 20479, 81919, 131071, 524287, 786431, 1310719, 2147483647
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2020

Keywords

Comments

Equally, numbers k such that sigma(k) is equal to A005940(1+k).
The primes in this sequence are obtained by subtracting 1 from those terms of A029747 that are one more than a prime.
Questions: Are there other composite terms than 55 and 87? Are there other even terms than 2? (All such even terms should also occur in A332218).

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], DivisorSigma[1, #] == Block[{p = Partition[Split[Join[IntegerDigits[#, 2], {2}]], 2], q}, Times @@ Flatten[Table[q = Take[p, -i]; Prime[Count[Flatten[q], 0] + 1]^q[[1, 1]], {i, Length[p]}]]] &] (* Michael De Vlieger, Feb 12 2020, after Robert G. Wilson v at A005940 *)

A332218 Numbers k such that A332221(k) = A156552(sigma(k)) is 2*{an odd square}.

Original entry on oeis.org

2, 162, 441, 2704, 4225, 275194921
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2020

Keywords

Comments

Any even term of A332216 must occur also in this sequence.

Examples

			  a(n)              -> sigma(a(n))              -> A156552(sigma(a(n)))
     2 = 2^1 * 1^2  ->    3 = 3^1               ->      2 = 2^1 * 1^1,
   162 = 2^1 * 3^4  ->  363 = 3^1 * 11^2        ->     98 = 2^1 * 7^2,
   441 = 3^2 * 7^2  ->  741 = 3^1 * 13^1 * 19^1 ->    578 = 2^1 * 17^2,
  2704 = 2^4 * 13^2 -> 5673 = 3^1 * 31^1 * 61^1 -> 526338 = 2^1 * 3^6 * 19^2,
  4225 = 5^2 * 13^2 -> 5673 = 3^1 * 31^1 * 61^1 -> 526338 = 2^1 * 3^6 * 19^2,
and
275194921 = 53^2 * 313^2 -> 281384229 = 3^1 * 7^1 * 181^2 * 409^1 -> 9671406556943421676716050 = 2^1 * 5^2 * 7^2 * 62829235873^2.
		

Crossrefs

Subsequence of A332217A067051A028982.

Programs

  • Mathematica
    Select[Range@ 5000, And[IntegerQ[#], OddQ[#]] &@ Sqrt[#/2] &@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ DivisorSigma[1, #]]] &] (* Michael De Vlieger, Feb 12 2020 *)
  • PARI
    \\ Needs also code from A156552:
    istosq(n) = ((1==valuation(n,2))&&issquare(n/2));
    for(n=1,2^25,if(istosq(A156552(sigma(n*n))),print1(n*n,", ")); if(istosq(A156552(sigma(2*n*n))),print1(2*n*n,", ")));

A356320 Length of the common prefix in binary expansions of n and A332221(n) = A156552(sigma(A005940(1+n))).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 2, 1, 4, 3, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 2, 6, 1, 2, 3, 2, 3, 1, 3, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 3, 3, 1, 4, 2, 3, 1, 1, 3, 3, 3, 6, 3, 2, 1, 3, 2, 1, 1, 2, 3, 2, 2, 2, 2, 2, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 06 2022

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    Abincompreflen(n, m) = { my(x=binary(n),y=binary(m),u=min(#x,#y)); for(i=1,u,if(x[i]!=y[i],return(i-1))); (u);};
    A156552(n) = {my(f = factor(n), p, 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}; \\ From A156552
    A347380(n) = Abincompreflen(A156552(n), A156552(sigma(n)));
    A356320(n) = A347380(A005940(1+n));
    \\ Alternatively as:
    A356320(n) = Abincompreflen(n, A156552(sigma(A005940(1+n))));

A347381 Distance from n to the nearest common ancestor of n and sigma(n) in the Doudna-tree (A005940).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 3, 2, 2, 3, 3, 2, 2, 3, 1, 3, 6, 3, 5, 1, 4, 5, 7, 2, 3, 4, 3, 0, 8, 4, 10, 4, 4, 7, 2, 4, 4, 7, 3, 4, 10, 4, 9, 4, 3, 9, 13, 4, 4, 4, 7, 7, 15, 4, 5, 5, 6, 9, 15, 4, 7, 10, 3, 5, 4, 6, 12, 6, 8, 5, 19, 5, 9, 6, 4, 8, 3, 5, 19, 4, 3, 11, 20, 4, 7, 11, 9, 6, 22, 4, 4, 8, 11, 15, 7, 5, 24, 5, 3, 5, 20
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2021

Keywords

Comments

a(n) tells about the degree of relatedness between n and sigma(n) in Doudna tree (see the illustration in A005940). It is 0 for those n where sigma(n) is one of the descendants of n, 1 for those n where the nearest common ancestor of n and sigma(n) is the parent of n, 2 for those n where the nearest common ancestor of n and sigma(n) is the grandparent of n, and so on.

Crossrefs

Indices of 0 .. 5 in this sequence are given by {2} U A336702, A347391, A347392, A347393, A347394, A374465.
Cf. A000203, A027687, A156552, A252463, A252464, A332221, A347380, A347383, A347384, A347390, A374481 [a(prime(n))], A374482 (indices of records), A374483 (record values).
Cf. also A336834.

Programs

  • PARI
    A000523(n) = logint(n,2);
    Abincompreflen(x, y) = if(!x || !y, 0, my(xl=A000523(x), yl=A000523(y), s=min(xl,yl), k=0); x >>= (xl-s); y >>= (yl-s); while(s>=0 && !bitand(1,bitxor(x>>s,y>>s)), s--; k++); (k));
    A156552(n) = {my(f = factor(n), p, 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}; \\ From A156552
    A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0);
    A252464(n) = if(1==n,0,(bigomega(n) + A061395(n) - 1));
    A347381(n) = (A252464(n)-Abincompreflen(A156552(n), A156552(sigma(n))));
    
  • 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)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A347381(n) = if(1==n,0, my(lista=List([]), i, k=n, stemvec, stemlen, sbr=sigma(n)); while(k>1, listput(lista,k); k = A252463(k)); stemvec = Vecrev(Vec(lista)); stemlen = #stemvec; while(1, if((i=vecsearch(stemvec,sbr))>0, return(stemlen-i)); sbr = A252463(sbr)));

Formula

a(n) = A252464(n) - A347380(n), where A347380(n) is the length of the common prefix in binary expansions of A156552(n) and A332221(n) = A156552(sigma(n)).

Extensions

Name changed, old name is now in formula section. - Antti Karttunen, Jul 09 2024

A058063 Number of prime factors (when counted with multiplicity) of sigma(n), the sum of divisors of n.

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 3, 2, 1, 3, 3, 3, 2, 4, 4, 1, 3, 2, 3, 3, 5, 4, 4, 4, 1, 3, 4, 4, 3, 5, 5, 3, 5, 4, 5, 2, 2, 4, 4, 4, 3, 6, 3, 4, 3, 5, 5, 3, 2, 2, 5, 3, 4, 5, 5, 5, 5, 4, 4, 5, 2, 6, 4, 1, 4, 6, 3, 4, 6, 6, 5, 3, 2, 3, 3, 4, 6, 5, 5, 3, 2, 4, 4, 6, 5, 4, 5, 5, 4, 4, 5, 5, 7, 6, 5, 5, 3, 3, 4, 2, 3, 6, 4, 4, 7
Offset: 1

Views

Author

Labos Elemer, Nov 23 2000

Keywords

Examples

			n=35, sigma(35) = 35 + 5 + 7 + 1 = 48 = 2*2*2*2*3, so a(35)=5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):a:=proc(n) if n=0 then 0 else bigomega(sigma(n)) fi end: seq(a(n), n=1..105); # Zerinvary Lajos, Apr 11 2008
  • Mathematica
    Array[PrimeOmega@ DivisorSigma[1, #] &, 105] (* Michael De Vlieger, Nov 08 2017 *)
  • PARI
    a(n) = bigomega(sigma(n)); \\ Michel Marcus, Nov 07 2017

Formula

a(n) = A001222(A000203(n)).
From Antti Karttunen, Feb 12 2020: (Start)
Additive with a(p^e) = A001222(A000203(p^e)) = A001222(1 + p + p^2 + ... + p^e).
a(n) = A000120(A332221(n)).
(End)

Extensions

Offset corrected by Antti Karttunen, Nov 07 2017

A347879 The nearest common ancestor of n and sigma(n) in the Doudna tree (A005940).

Original entry on oeis.org

1, 2, 2, 2, 3, 6, 2, 2, 2, 2, 3, 3, 7, 3, 6, 2, 2, 2, 5, 10, 2, 2, 3, 6, 2, 5, 2, 28, 3, 2, 2, 2, 3, 2, 6, 2, 19, 3, 7, 3, 5, 3, 11, 5, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 5, 3, 3, 3, 31, 3, 5, 2, 5, 2, 17, 5, 3, 2, 2, 2, 37, 17, 2, 3, 6, 5, 5, 5, 4, 5, 5, 5, 2, 7, 3, 3, 3, 3, 5, 5, 2, 2, 3, 3, 2, 2, 7, 2, 13, 2
Offset: 1

Views

Author

Antti Karttunen, Oct 13 2021

Keywords

Comments

The fixed points of this sequence is given by the union of {2} and A336702.
The positions x such that a(x) = A252463(x) is given by the union of {1} and A347391.
The positions x such that a(x) = A252463(A252463(x)) is given by the union of {1} and A347392.

Crossrefs

Programs

Formula

a(n) = A348041(n, A000203(n)).

A332222 a(n) = A156552(sigma(A005940(1+n))).

Original entry on oeis.org

0, 2, 3, 8, 5, 11, 32, 10, 7, 13, 23, 35, 1024, 66, 39, 1024, 11, 23, 31, 37, 47, 55, 133, 43, 258, 2050, 4099, 72, 267, 87, 48, 38, 17, 27, 47, 71, 55, 95, 263, 45, 95, 111, 191, 151, 8199, 269, 175, 4099, 264, 518, 1035, 2056, 1037, 8203, 2080, 138, 207, 539, 1071, 167, 1048592, 98, 291, 1073741824, 13, 37, 71, 75, 75, 111
Offset: 0

Views

Author

Antti Karttunen, Feb 12 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ DivisorSigma[1, #]]] &@ Block[{p = Partition[Split[Join[IntegerDigits[#, 2], {2}]], 2], q}, Times @@ Flatten[Table[q = Take[p, -i]; Prime[Count[Flatten[q], 0] + 1]^q[[1, 1]], {i, Length[p]}]]] &, 70, 0] (* Michael De Vlieger, Feb 12 2020, after Robert G. Wilson v at A005940 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A156552(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}; \\ From A156552
    A332222(n) = A156552(sigma(A005940(1+n)));

Formula

a(n) = A156552(A000203(A005940(1+n))).
a(n) = A332221(A005940(1+n)) = A156552(A324054(n)).

A347876 a(n) = A323905(sigma(n)), where A323905(x) = A156552(x) - A048675(x).

Original entry on oeis.org

0, 0, 1, 0, 2, 7, 4, 4, 0, 8, 7, 25, 8, 18, 18, 0, 8, 32, 13, 26, 26, 21, 18, 35, 0, 26, 32, 60, 14, 48, 26, 26, 41, 22, 41, 32, 128, 35, 60, 36, 26, 88, 49, 63, 98, 48, 41, 3073, 128, 1024, 48, 32, 22, 78, 48, 78, 71, 36, 35, 138, 1024, 88, 228, 0, 63, 103, 193, 64, 88, 103, 48, 100, 2048, 386, 3073, 69, 88, 138, 71
Offset: 1

Views

Author

Antti Karttunen, Sep 19 2021

Keywords

Crossrefs

Programs

  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ From A048675
    A156552(n) = {my(f = factor(n), p, 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}; \\ From A156552
    A323905(n) = (A156552(n) - A048675(n));
    A347876(n) = A323905(sigma(n));

Formula

a(n) = A323905(A000203(n)).
a(n) = A332221(n) - A331750(n).

A347875 Numbers k such that A323905(sigma(k)) is equal to A323905(2*k).

Original entry on oeis.org

1, 6, 21, 28, 496, 8128
Offset: 1

Views

Author

Antti Karttunen, Sep 19 2021

Keywords

Comments

Numbers k such that A323905(sigma(k)) = A332221(k) - A331750(k) is equal to 2*A156552(k) - A048675(k) = A156552(k) + A323905(k).

Crossrefs

Cf. also A000396 (subsequence), A331751, A347392.

Programs

  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ From A048675
    A156552(n) = {my(f = factor(n), p, 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}; \\ From A156552
    A323905(n) = (A156552(n) - A048675(n));
    isA347875(n) = (A323905(sigma(n))==A323905(2*n));
Showing 1-10 of 10 results.