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

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

A374215 a(n) = A347381(n) - A374214(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 07 2024

Keywords

Comments

The first negative term is a(1271) = A347381(1271) - A374214(1271) = 9 - 10 = -1. The next ones occur at n=97969, 133907, 142859, 161257, 189209.

Crossrefs

Cf. A005940, A347381, A374214, A374218 (indices of nonpositive terms).

Programs

  • 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)));
    A374214(n) = { my(m=-1,x); fordiv(n,d,if(d>1 && dA347381(d); if(m<0 || xA374215(n) = (A347381(n)-A374214(n));

A374219 Composite numbers k such that A347381 obtains the same value for all divisors of k that are larger than one, where A347381 is the distance from n to the nearest common ancestor of n and sigma(n) in the Doudna-tree (A005940).

Original entry on oeis.org

15, 77, 1403, 3127, 3139, 8383, 15247, 45151, 47263, 54053, 58339, 65473, 73813, 79567, 89951, 94957, 155011, 211621, 293323, 333961, 360883, 441901, 444853, 496597, 612893, 623659, 646367, 727393, 786193, 796723, 1334083, 1456813, 1572491, 2103379, 2139793, 2477509, 2668867, 2735539, 2826787, 2903591, 3121133
Offset: 1

Views

Author

Antti Karttunen, Jul 07 2024

Keywords

Comments

The first 47 terms are all semiprimes.
For three consecutive terms k=293323, 333961, 360883, A347381(k) = 89.
For three consecutive terms k=612893, 623659, 646367, A347381(k) = 134.

Examples

			77 has divisors [7, 11, 77] that are larger than 1. For all of them, A347381 obtains value 3, therefore 77 is included in the sequence.
		

Crossrefs

Subsequence of A374218.

Programs

  • PARI
    isA374219(n) = if(1==n || isprime(n), 0, my(w=A347381(n)); fordiv(n, d, if(d>1 && A347381(d)!=w, return(0))); (1));
Showing 1-3 of 3 results.