5
$\begingroup$

Let's define the radical of the positive integer $n$ as $$\operatorname{rad}(n)=\prod_{\substack{p\mid n\\ p\text{ prime}}}p$$ and consider the following Fibonacci-like sequence $$a_{n+1}=\operatorname{rad}(a_{n})+\operatorname{rad}(a_{n-1})$$ If $a_1=1,\,a_2=1$ the sequence coincides with OEIS A121369 $$1, 1, 2, 3, 5, 8, 7, 9, 10, 13, 23, 36, 29, 35, 64, 37, 39, 76, 77, ...$$ If $a_1=2,\,a_2=2$ the sequence becomes $$2, 2, 4, 4, 4, ...$$ If $a_1=3,\,a_2=3$ the sequence becomes $$3, 3, 6, 9, 9, 6, 9, ...$$ If $a_1=5,\,a_2=5$ the sequence becomes $$5, 5, 10, 15, 25, 20, 15, 25, ...$$ If $a_1=7,\,a_2=7$ the sequence becomes $$7, 7, 14, 21, 35, 56, 49, 21, 28, 35, 49, 42, 49, 49, 14, 21, ...$$ The above sequences, except for the first, are all periodic. Continuing with the successive prime numbers, we obtain:

for $\,p=11,\,$ a sequence with a period length of $\,9$,

for $\,p=13,\,$ a sequence with a period length of $\,81$,

but for $\,p=17\,$ and $\,p=19\,$ two apparently divergent sequences.

Other primes that generate periodic sequences are (the respective period lengths in brackets):

$$23 (9), 29 (12), 31 (207), 37 (27), 41 (36), 47 (39), 73 (198), 79 (60)$$

Some questions arise from the previous experimental observations:

  • is the period length always a multiple of $3$ (not considering the case $p=2$)?

  • also in the doubtful cases mentioned above, does the sequence become periodic at some point?

  • given the starting prime number, is it possible to predict the length of the period of the generated sequence or, at least, to identify some pattern?

I have posted a more general question of the same nature here.


Edit

For the calculation of $\,\operatorname{rad}(n)\,$ I used the sympy.primefactors() method inside Python:

from sympy import primefactors

def rad(num):
    primes = primefactors(num)
    value = 1
    for p in primes:
        value *= p
    return value

(a0, a1) = (17, 17)
for n in range(2, 10001):
    a2 = rad(a1) + rad(a0)
    print(n, a2)
    a0 = a1
    a1 = a2
$\endgroup$
15
  • 1
    $\begingroup$ For $p=17$ where the sequence seem to diverge, it becomes relevant, how you factor the occuring big integers - using $N$ up to $500$ we reach numbers of size $2^{73}$ and I'm not sure about the factoring-abilities in for instance Pari/GP: if you don't want to be confronted with extremely time-consuming full factoring, I think it becomes irreal to guess the proceeding of the sequence after say $N=10 000$ steps... So what have you done for this prime $p=17$? $\endgroup$ Commented May 18, 2022 at 8:45
  • 1
    $\begingroup$ @GottfriedHelms PARI/GP can factor numbers upto about $60$ digits quite fast. There are much better tools (yafu for example) with which we can manage about $120$ digits , with a little luck more , but if we get to numbers with several hundred digits, we won't be able to factor them in general in a reasonable amount of time. $\endgroup$
    – Peter
    Commented May 18, 2022 at 9:23
  • 1
    $\begingroup$ But if so large numbers occur, I anayway doubt that the sequence will become periodic. $\endgroup$
    – Peter
    Commented May 18, 2022 at 9:25
  • 2
    $\begingroup$ Seems that the periodical cases soon thin out : In the range $[79,10^5]$ , only the primes $79,83,107,367,1669$ do NOT exceed $10^{15}$ within the first $10^4$ steps. $\endgroup$
    – Peter
    Commented May 18, 2022 at 10:31
  • 1
    $\begingroup$ An observation, if we call the terms of OEIS A121369 as $s_n$ and if $\gcd(p, s_n)=1$ for all $n$, then the sequence for $p$ is periodic if and only if sequence OEIS A121369 is periodic. This follows from the fact that $\operatorname{rad}$ is a multiplicative function. Showing that every prime divides at least one $s_n$ might be something to try to show so that we can't make this argument. $\endgroup$
    – Merosity
    Commented May 18, 2022 at 10:57

2 Answers 2

1
$\begingroup$

This is basically a comment of how hard the problem is by demonstrating that the sequence starting with $a_1=a_2=p$ with $a_{n+1}=\operatorname{rad}(a_n)+\operatorname{rad}(a_{n-1})$ is equivalent to taking the sequence from OEIS A121369 but modifying it so that $b_1=b_2=1$ and computing $\operatorname{rad}(b_n)+\operatorname{rad}(b_{n-1})$ as usual, but then removing the highest power of $p$ dividing that sum to get $b_{n+1}$.

In particular, if you think determining if sequence OEIS A121369 is periodic is difficult, then adding the complexity of dividing out the largest power of $p$ at every step of the iteration seems to make this even more eratic and difficult. If you don't agree with that heuristic you can stop reading now, but if you think that's acceptable, you can continue on to the proof of the claim that the sequences are equivalent.


If $p$ divides two consecutive terms, then they divide the third term. So that means $p$ divides all the terms of our sequence. We can then write our sequence as $a_n=p^{1+k_n}b_n$ with $b_n$ not divisible by $p$ and $k_n \ge 0$. $$a_{n+1}=\operatorname{rad}(a_n)+\operatorname{rad}(a_{n-1})$$ $$p^{1+k_{n+1}}b_{n+1}=\operatorname{rad}(p^{1+k_{n+1}}b_n)+\operatorname{rad}(p^{1+k_n}b_{n-1})$$ $$p^{k_{n+1}}b_{n+1}=p\operatorname{rad}(b_n)+p\operatorname{rad}(b_{n-1})$$ $$p^{k_{n+1}}b_{n+1}=\operatorname{rad}(b_n)+\operatorname{rad}(b_{n-1})$$

We can always reconstruct the $k_n$ immediately with the $p$-adic absolute value:

$$k_{n+1}= v_p(\operatorname{rad}(b_n)+\operatorname{rad}(b_{n-1}))$$

So we can introduce the notation that $[x]_p$ means $x$ with the largest power of $p$ divided out of it, in terms of the $p$-adic valuation, $x=p^{v_p(x)}[x]_p$.

$$b_{n+1}=[\operatorname{rad}(b_n)+\operatorname{rad}(b_{n-1})]_p$$

This sequence starts the same as OEIS A121369, the only difference is we are simply dividing out all the $p$ from it at each step of the iteration.

In order for the sequence $a_n$ to be periodic, since $a_n=p^{1+k_n}b_n$, $b_n$ must be periodic. It turns out this is not only necessary, but sufficient. To prove it's sufficient, let's suppose $b_n=b_{n+T}$.

$$k_n = v_p(\operatorname{rad}(b_{n-1})+\operatorname{rad}(b_{n-2})= v_p(\operatorname{rad}(b_{n-1+T})+\operatorname{rad}(b_{n-2+T})=k_{n+T}$$

That concludes the proof.

$\endgroup$
0
$\begingroup$

Just a comment, in the intention to recognize patterns giving hints towards analytical arguments about periodicities.

In the table below I show the sequences for $N=60$ steps for the primes $p=3..97$ where every sequence is divided by the leading prime; plus the sequence for $p=1$ as top row. The leading column in the table is the initial prime (or $1$) . The sequences start in the second column. This picture looks somehow frappant and makes me think further...

   1  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136
   3  1  1  2  3  3  2  3  3   2   3   3   2   3   3   2   3   3    2    3    3    2    3    3    2    3    3    2    3    3    2    3    3    2    3    3    2    3    3    2    3     3    2     3     3     2     3     3     2     3     3      2      3     3     2     3     3     2     3     3     2
   5  1  1  2  3  5  4  3  5   4   3   5   4   3   5   4   3   5    4    3    5    4    3    5    4    3    5    4    3    5    4    3    5    4    3    5    4    3    5    4    3     5    4     3     5     4     3     5     4     3     5      4      3     5     4     3     5     4     3     5     4
   7  1  1  2  3  5  8  7  3   4   5   7   6   7   7   2   3   5    8    7    3    4    5    7    6    7    7    2    3    5    8    7    3    4    5    7    6    7    7    2    3     5    8     7     3     4     5     7     6     7     7      2      3     5     8     7     3     4     5     7     6
  11  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77   45   22   17   19   36   25   11    6    7   13   20   23   33   26   29   55   34   39   73  112   87   101  188   195   289   212   123   229   352   231    23     44     25     7    12    13    19    32    21    23    44
  13  1  1  2  3  5  8  7  9  10  13  11  12  17  23  40  33  43   76   81   41   44   63   43   64   45   17   32   19   21   40   31   41   72   47   53  100   63   31   52   33    35   68    69   103   172   189   107   128   109   111    220    221   127   144   133   139   272   173   207   242
  17  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   12    7   13   20   23   33   56   47   61  108   67   73  140  143  213  356  391   201  224   215   229   444   451   673  1124  1235  1797   3032   2555  3313  5868  4291  5269  9560  7659  4943  7496
  19  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   41   43   84   85  127  212  233  339  572  625  291  296  365  439  804  841  431  460  661  891  694  727  1421  930  1133  2063  3196  3661  5259  8920  7489  9719  17208  11153  2021  2608  2347  2673  2380  1223  2413  1350
  23  1  1  2  3  5  8  7  9  10  13  23  14  15  29  44  51  73  124  135   77   92   79   81   82   85  167  252  209  251  460  261   97  184   99   35   68   69   37   40   47    57  104    83   109   192   115    11    16    13    15     28     29    43    72    49    13    20    23    11    12
  29  1  1  2  3  5  8  7  9  10  13  23  36  29   7   8   9   5    8    7    9   10   13   23   36   29    7    8    9    5    8    7    9   10   13   23   36   29    7    8    9     5    8     7     9    10    13    23    36    29     7      8      9     5     8     7     9    10    13    23    36
  31  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   15   16   17   19   36   25   11   16   13   15   28   29   43   72   49    13   20    23    33    56    47    61   108    67    73    140    143   213   356   391   569   960   599   629  1228
  37  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37   3    4    5    7   12   13   19   32   21   23   44   45   37   16    3    5    8    7    9   10   13   23   36   29    35   64    37     3     4     5     7    12    13    19     32     21    23    44    45    37    16     3     5     8
  41  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   32    3     5    8     7     9    10    13    23    36    29    35     64     37    39    76    77   115   192   121    17    28
  43  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136
  47  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47     7    8     9     5     8     7     9    10    13    23     36     29    35    64    37    39    76    77   115   192
  53  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53   48     7    13    20    23    33    56    47    61    108     67    73   140   143   213   356   391   569   960
  59  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    38    39    77   116
  61  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61   47   48   53   59  112   73   87  160   97  107  204  209   311  520   441   151   172   237   323   560   393   463    856    677   891   710   743  1453  2196  1459  1465  2924
  67  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136
  71  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71    66
  73  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73    63    22    43    65   108    71    77   148
  79  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136
  83  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83    58    59   117     98     53    67   120    97   127   224   141   155   296
  89  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136
  97  1  1  2  3  5  8  7  9  10  13  23  36  29  35  64  37  39   76   77  115  192  121   17   28   31   45   46   61  107  168  149  191  340  361  189   40   31   41   72   47    53  100    63    31    52    57    83   140   153   121     62     73   135    88    37    59    96    65    71   136


Second comment. Here is the list of the cyclelengthes of all so far known cycles when a prime $p$ is given.

Checks went to maximal length $600$ of a cycle, and all primenumbers below $10\,000$ were tested needing approx. $500$ sec. The factorization was done with Pari/GP and its option "prime_proven" for the factorization, which means no pseudoprimes allowed.
I've found the same primenumbers as in @Peter's comment. Repetitions began at index $k$

  • Note1: cycle-lengthes were wrongly calculated in my deleted comments; I overlooked a missing $1$ due to decremented index $k$ at comparision-operation. Now my lengthes agree with the OP's calculations.
  • Note2: to detect cycles it is not enough to find repetition of one value $a_k$, but we must find repetitions of two consecutive values $[a_k,a_{k+1}]$.
  • Note3: I now believe this list is complete/finite.
  • Note4: the list is not in the OEIS.

$$ \small \begin{array} {r} p & cyclen & k & a_k & a_{k+1} \\ \hline 2 & 1 & 3 & 4 & 4 \\ 3 & 3 & 3 & 6 & 9 \\ 5 & 3 & 4 & 15 & 25 \\ 7 & 12 & 3 & 14 & 21 \\ 11 & 9 & 50 & 253 & 484 \\ 13 & 81 & 5 & 65 & 104 \\ 23 & 9 & 56 & 299 & 460 \\ 29 & 12 & 5 & 145 & 232 \\ 31 & 207 & 6 & 248 & 217 \\ 37 & 27 & 4 & 111 & 185 \\ 41 & 36 & 4 & 123 & 205 \\ 47 & 39 & 5 & 235 & 376 \\ 73 & 198 & 4 & 219 & 365 \\ 79 & 60 & 28 & 4819 & 8453 \\ 83 & 48 & 36 & 3320 & 2573 \\ 107 & 87 & 13 & 3103 & 3745 \\ 367 & 54 & 36 & 14680 & 11377 \\ 1669 & 90 & 25 & 51739 & 75105 \end{array} $$


3'rd Comment
In MO Peter Taylor gave a simple observation to question 1: the periodicity $\pmod 2$ has cyclelength $3$ .
This is (surely) obvious by oddness of $(a_1,a_2)=(p_1,p_2)$ and necessary evenneness of $a_3$ and oddness of $a_4$ and so on, and answers that question, by the basic consideration that the overall cycle-length must be a multiple of any such elementary (sub-)cycle length.

$\endgroup$
1
  • $\begingroup$ Thank you for your thorough analysis and please submit the list to the OEIS staff. $\endgroup$ Commented May 18, 2022 at 20:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .