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

A099307 Least k such that the k-th arithmetic derivative of n is zero, or 0 if no k exists.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Oct 12 2004

Keywords

Comments

Denote the k-th derivative of n by d(n,k). We know that we can stop taking derivatives if either d(n,k) = 0 or d(n,k) has a factor of the form p^p for prime p. In the latter case, the derivatives will stay constant or grow without bound.

References

Crossrefs

Cf. A003415 (arithmetic derivative of n).
Cf. A099308 (numbers whose k-th arithmetic derivative is zero for some k).
Cf. A099309 (numbers whose k-th arithmetic derivative is nonzero for all k).
Cf. A189760 (least number whose n-th arithmetic derivative is zero).

Programs

  • Mathematica
    dn[0]=0; dn[1]=0; dn[n_]:=Module[{f=Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Plus@@(n*f[[2]]/f[[1]])]]; Table[k=0; d=n; done=False; While[If[d==1, done=True, f=FactorInteger[d]; Do[If[f[[i, 1]]<=f[[i, 2]], done=True], {i, Length[f]}]]; !done, k++; d=dn[d]]; If[d==1, k+1, 0], {n, 200}]

A327968 a(0) = a(1) = 0, a(prime) = 1, and for all other numbers, a(n) = the first noncomposite reached when iterating A327965, or -1 if no noncomposite is ever reached.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 5, 1, 3, 5, 7, 1, 1, 1, 5, 2, 2, 1, 7, 1, 5, 7, 13, 1, 11, 7, 2, 1, 2, 1, 31, 1, 5, 5, 19, 3, 2, 1, 7, 1, 17, 1, 41, 1, 3, 1, 7, 1, 7, 5, 1, 5, 5, 1, 3, 1, 23, 13, 31, 1, 23, 1, 5, 5, 3, 7, 61, 1, 7, 2, 59, 1, 1, 1, 1, 1, 5, 7, 71, 1, 11, 1, 43, 1, 31, 13, 1, 2, 3, 1, 11, 5, 5, 19, 5, 5, 17, 1, 7, 1, 3, 1, 5, 1, 41, 71
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2019

Keywords

Comments

Of the prime terms, 5 seems to be the most common (8886 occurrences among the first 100001 terms). See also A327975.

Crossrefs

Programs

  • PARI
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A327938(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]%f[k,1])); factorback(f); };
    A327965(n) = if(n<=1,0,A327938(A003415(n)));
    A327968(n) = if(n<=1,0,if(isprime(n),1, while((n>1)&&!isprime(n), n = A327965(n)); (n)));

A327975 Breadth-first reading of the subtree rooted at 5 of the tree where each parent node is the arithmetic derivative (A003415) of all its children.

Original entry on oeis.org

5, 6, 9, 14, 33, 49, 62, 94, 177, 817, 961, 445, 913, 1633, 2173, 2209, 1146, 886, 1822, 4414, 19193, 25829, 32393, 41033, 47429, 57929, 64133, 88229, 101753, 111173, 116729, 129413, 138233, 148553, 160229, 173093, 183929, 188453, 208613, 216773, 232229, 235913, 244229, 249929, 257573, 262793, 272633, 278153, 282533, 288329, 294473, 304613, 316229, 320933, 322853, 323429, 327653, 328313, 1155, 2649
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2019

Keywords

Comments

Permutation of A328115.
The branching degree of vertex v is given by A099302(v).
Leaves form a subsequence of A098700.
Most terms of A189760 (apart from 0, 1, 2, 414, ...) seem to be located in this tree, in positions where they have no smaller siblings.
For any number k at level n (where 5 is at level 2), we have A256750(k) = A327966(k) = n.
Question: Does this subtree contain infinitely long paths? How many? Cf. conjecture number 8 in Ufnarovski and Ahlander paper, and a similar tree starting from 7, A327977.

Examples

			Because we have A003415(5) = 1, A003415(6) = 5, A003415(9) = 6, A003415(14) = 9, A003415(33) = A003415(49) = 14, A003415(62) = 33, etc, this subtree is laid out as below. The terms of this sequence are obtained by scanning each successive level of the tree from left to right, from the node 5 onward:
   (0)
    |
   (1)
    |
    5
    |
    6
    |
    9
    |
    14________________
    |                 |
    33               49
    |                 |
    62________       94_____________________________
    |    |    |       |       |      |      |       |
    |    |    |       |       |      |      |       |
   177  817  961     445     913   1633   2173    2209
              |       |       |                     |
              |       |       |                     |
            1146     886    1822                  4414
              |       |       |                     |
              |       |       |                     |
            (19193,  (1155,  (19921, ..., 829921)  (22045, ..., 4870849)
             25829,   2649,                        [49 children for 4414]
               ...,  ...,    [27 children for 1822]
            328313)  196249)
                     [19 children for 886]
        [38 children
         for 1146]
The row lengths thus start as: 1, 1, 1, 1, 2, 2, 8, 4, 133 (= 38+19+27+49), ...
		

Crossrefs

Cf. A327977 for the subtree starting from 7, and also A263267 for another similar tree.

Programs

  • PARI
    A002620(n) = ((n^2)>>2);
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A327975list(e) = { my(lista=List([5]), f); for(n=1, e, f = lista[n]; for(k=1,1+A002620(f),if(A003415(k)==f, listput(lista,k)))); Vec(lista); };
    v328975 = A327975list(21);
    A327975(n) = v328975[n];
    
  • Sage
    # uses[A003415]
    def A327975():
      '''Breadth-first reading of irregular subtree rooted at 5, defined by the edge-relation A003415(child) = parent.'''
      yield 5
      for x in A327975():
        for k in [1 .. 1+(x*x)//2]:
          if A003415(k) == x: yield k
    def take(n, g):
      '''Returns a list composed of the next n elements returned by generator g.'''
      z = []
      if 0 == n: return z
      for x in g:
        z.append(x)
        if n > 1: n = n-1
        else: return(z)
    take(60, A327975())

A327977 Breadth-first reading of the subtree rooted at 7 of the tree where each parent node is the arithmetic derivative (A003415) of all its children.

Original entry on oeis.org

7, 10, 21, 25, 18, 38, 46, 65, 77, 217, 361, 129, 205, 493, 529, 98, 426, 718, 170, 254, 462, 982, 1501, 2077, 2257, 2105, 2933, 6953, 11513, 14393, 16469, 17813, 19769, 21653, 24053, 25769, 27413, 29993, 34553, 35369, 41273, 42233, 42869, 44969, 45113, 45173, 11917, 27757, 38881, 45937, 62317, 76897, 84781, 102637, 111457, 114481, 117217, 118477, 120781, 127117, 128881, 501, 1141
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2019

Keywords

Comments

Permutation of A328117.
The branching degree of vertex v is given by A099302(v).
Leaves form a subsequence of A098700.
For any number k at level n (where 7 is at level 2), we have A256750(k) = A327966(k) = n.
Question: Does this subtree contain infinitely long paths? How many? Cf. conjecture number 8 in Ufnarovski and Ahlander paper. As an example of possible beginning of such a sequence they give: 1 ← 7 ← 10 ← 25 ← 46 ← 129 ← 170 ← 501 ← 414 ← 2045.

Examples

			The subtree is laid out as below. The terms of this sequence are obtained by scanning each successive level of the tree from left to right, from the node 7 onward:
   (0)
    |
   (1)
    |
    7
    |
    10______________________________
    |                               |
    21________                     25
    |         |                     |
    18___    38_____               46_________________________________
    |    |    |     |               |            |      |             |
    65   77  217   361____         129____      205    493_____      529
         |          |     |         |     |             |      |
         98        426   718       170   254           462    982
         |          |     |         |     |             |      |
        [3]       [21]   [15]      [9]   [9]           [28]   [17]
On the last level illustrated above, the numbers in brackets [ ] tell how many children the node has. E.g, there are three for 98: 1501, 2077, 2257, as A003415(1501) = A003415(2077) = A003415(2257) = 98, and nine for 170: 501, 1141, 2041, 2869, 4309, 5461, 6649, 6901, 7081.
		

Crossrefs

Cf. A327975 for the subtree starting from 5, and also A263267 for another similar tree.

Programs

  • PARI
    A002620(n) = ((n^2)>>2);
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A327977list(e) = { my(lista=List([7]), f); for(i=1, e, f = lista[i]; for(k=1,1+A002620(f),if(A003415(k)==f, listput(lista,k)))); Vec(lista); };
    
  • PARI
    \\ With precomputed large A328117, use this:
    v328117 = readvec("a328117.txt");
    A327977list(e) = { my(lista=List([7]), f, i); for(n=1, e, f = lista[n]; print("n=",n," #lista=", #lista, " A002620(",f,")=",A002620(f)); my(u=1+A002620(f)); if(u>=v328117[#v328117],print("Not enough precomputed terms of A328117 as search upper limit ", u, " > ", v328117[#v328117], " (the last item in v328117). Number of expansions so far=", n); return(1/0)); i=1; while(v328117[i]A003415(v328117[i])==f, listput(lista,v328117[i])); i++)); Vec(lista); };
    v327977 = A327977list(114);
    A327977(n) = v327977[n];
    for(n=1,#v327977,write("b327977.txt", n, " ", A327977(n)));
    
  • Sage
    # uses[A003415]
    def A327977():
      '''Breadth-first reading of irregular subtree rooted at 7, defined by the edge-relation A003415(child) = parent. Starts giving terms from 7 onward, after a(0) = 0 and a(1) = 1.'''
      yield 7
      for x in A327977():
        for k in [1 .. 1+floor((x*x)/2)]:
          if(A003415(k) == x): yield k
    def take(n, g):
      '''Returns a list composed of the next n elements returned by generator g.'''
      z = []
      if 0 == n: return(z)
      for x in g:
        z.append(x)
        if n > 1: n = n-1
        else: return(z)
    take(52, A327977())

A327967 Positions of records in A327966.

Original entry on oeis.org

0, 1, 2, 6, 9, 14, 33, 62, 177, 414, 1155, 1719, 2625, 4018, 6849, 9770, 17675, 30206, 90609, 164088, 336006, 757995, 1290874, 2029875, 4059746, 7037655, 17594075, 50850483, 68589598, 186888243, 373659254
Offset: 0

Views

Author

Antti Karttunen, Oct 01 2019

Keywords

Comments

Starting offset is zero to align with the indexing used in A189760, as this is conjecturally also the least k such that A327966(k) = n.
For at least n = 1, 3, 4, 5, 6, 7, 10, 14, 15, 17, 18, 21, 23, 24, 25, 26, 27, 28, 29, a(n) = A327965(a(1+n)). For example, 30206 = A327965(90609) and 90609 = A327965(164088).
Applying A327968 to these terms yields: 0, 0, 1, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, ...
See also comments in A189760.

Crossrefs

Differs from A189760 for the first time at n=19, as a(19) = 164088, while A189760(19) = 260343.

Programs

  • PARI
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A327938(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]%f[k,1])); factorback(f); };
    A327965(n) = if(n<=1,0,A327938(A003415(n)));
    A327966(n) = if(!n,0,1+A327966(A327965(n)));
    k=0; n=0; m=-1; while(k<32, if(!(n%2^27),print1("(",n,"),")); if((t=A327966(n))>m, write("b327967.txt", k, " ", n); m = t; k++); n++);

A363373 a(n) is the least k such that, if x_0, x_1, x_2, ... are the iterations of the arithmetic derivative A003415 starting with x_0 = k, x_0 > x_1 > ... > x_n.

Original entry on oeis.org

0, 1, 2, 6, 9, 14, 33, 62, 177, 886, 1155, 1719, 3255, 4018, 13377, 19942, 46022, 103401, 193426, 422751, 634113, 1080742, 2850591, 5493662, 10252635, 25631525, 51217666, 135055839
Offset: 0

Views

Author

Robert Israel, May 29 2023

Keywords

Comments

a(n) is the least k such that the first n iterations of A003415 starting at k are decreasing.
a(n) is the least k such that A361869(k) = n.

Examples

			a(3) = 6 because the iterations of A003415 starting at 6 are 6 > 5 > 1 > 0 = 0.
First differs from A189760 and A327967 at 9, where a(9) = 886 (corresponding to iterations 886 > 445 > 94 > 49 > 14 > 9 > 6 > 5 > 1 > 0) while A189760(9) = A327967(9) = 414 < A003415(414) = 501.
		

Crossrefs

Programs

  • Maple
    ader:= proc(n) local t;
      n * add(t[2]/t[1], t = ifactors(n)[2])
    end proc:
    f:= proc(n) option remember; local t;
       t:= ader(n);
       if t < n then procname(t)+1 else 0 fi
    end proc:
    M:= 25: V:= Array(0..M,-1): count:= 0:
    for n from 0 while count <= M do
      v:= f(n);
      if V[v] = -1 then count:= count+1; V[v]:= n fi;
    od:
    convert(V,list);
Showing 1-6 of 6 results.