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.

A267758 If a(n) is prime, then a(n) = a(n+1) - a(n-1): lexicographic first permutation of the nonnegative integers with this property.

Original entry on oeis.org

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

Views

Author

Eric Angelini and M. F. Hasler, Jan 21 2016

Keywords

Comments

In practice, the definition implies that if a prime term a(n) has been added, the next term is computed as a(n+1) = a(n) + a(n-1). Will it ever happen that a term computed that ("greedy") way would be equal to a number which already occurred previously? This is of course forbidden, so the term a(n) which was "tentatively" added has to be changed, as to be either composite, or to "produce" a "legal" a(n+1). In case a(n) itself was already computed as sum of the two preceding terms (because of a prime a(n-1)), this backtracking must go one step further. But since the sum of two primes > 2 is even, there will never be three primes > 2 in a row.
As a result (independently found by Lars Blomberg, private communication), there cannot be more than the three lines that can already be seen in the graph of a(0..1000): (i) a(n) ~ n if the predecessor is composite, (ii) a(n) ~ 2n if a(n-1) is prime but a(n-2) isn't, (iii) a(n) ~ 3n if a(n-1) and a(n-2) both are prime. - M. F. Hasler, Jan 25 2016
Lars Blomberg also observed that (i) the sequence of the lesser of two consecutive odd primes is (at least up to n = 1000) the same as A217199, and (ii) the "isolated primes" are always (up to n = 10^7) preceded by an even composite number. We can show that the latter implies that a(n+1) = a(n) + a(n-1) (with prime a(n)) will never be equal to a previously used number, which in that case must lie on the "upper line" of the (even) a(m+1) = a(m-2) + 2*a(m-1) ~ 3m, m < n, in order to occur before a(n+1) ~ 2n, so that we would have a sequence "odd, prime, even". - M. F. Hasler, Jan 25 2016

Crossrefs

Cf. A217199.

Programs

  • PARI
    {N=200; a=[]; U=[]; L=0; while(#a
    	

    A342701 a(n) is the second smallest k such that phi(n+k) = phi(k), or 0 if no such solution exists.

    Original entry on oeis.org

    3, 7, 5, 14, 9, 34, 7, 16, 15, 26, 11, 68, 39, 28, 15, 32, 33, 72, 25, 40, 35, 56, 17, 101, 45, 37, 45, 56, 29, 152, 31, 61, 39, 56, 35, 144, 37, 61, 39, 74, 41, 128, 35, 88, 45, 161, 47, 192, 49, 82, 51, 74, 95, 216, 43, 97, 75, 203, 59, 304, 91, 88, 63, 122
    Offset: 1

    Author

    Amiram Eldar, Mar 18 2021

    Keywords

    Comments

    Sierpiński (1956) proved that there is at least one solution for all n>=1.
    Schinzel (1958) proved that there are at least two solutions k to phi(n+k) = phi(k) for all n <= 8*10^47. Schinzel and Wakulicz (1959) increased this bound to 2*10^58.
    Schinzel (1958) observed that under the prime k-tuple conjecture there is a second solution for all even n.
    Holt (2003) proved that there is a second solution for all even n <= 1.38 * 10^26595411.

    Examples

    			a(1) = 3 since the solutions to the equation phi(1+k) = phi(k) are k = 1, 3, 15, 104, 164, ... (A001274), and 3 is the second solution.
    		

    References

    • Richard K. Guy, Unsolved Problems in Number Theory, 3rd edition, Springer, 2004, section B36, page 138-142.
    • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 3, p. 217-219.
    • Wacław Sierpiński, Sur une propriété de la fonction phi(n), Publ. Math. Debrecen, Vol. 4 (1956), pp. 184-185.

    Crossrefs

    Programs

    • Mathematica
      f[n_, 0] = 0; f[n_, k0_] := Module[{k = f[n, k0 - 1] + 1}, While[EulerPhi[n + k] != EulerPhi[k], k++]; k]; Array[f[#, 2] &, 100]
    • PARI
      a(n) = my(k=1, nb=0); while ((nb += (eulerphi(n+k)==eulerphi(k))) != 2, k++); k; \\ Michel Marcus, Mar 19 2021

A217198 A sequence of odd primes p such that 2p-1 is prime and no p is equal to any 2q-1 with q in the sequence.

Original entry on oeis.org

3, 7, 31, 37, 97, 139, 157, 199, 211, 229, 271, 307, 331, 337, 367, 379, 439, 499, 547, 577, 601, 607, 619, 691, 727, 811
Offset: 1

Author

Michel Marcus, Sep 27 2012

Keywords

Comments

Sequence used in conjunction with A001259 in the referenced articles.
It is not clear that this sequence is correct -- it certainly does not match the title. See A217199 for the correct version. - T. D. Noe, Sep 28 2012

Crossrefs

Showing 1-3 of 3 results.