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.

User: Kevin J. Gomez

Kevin J. Gomez's wiki page.

Kevin J. Gomez has authored 4 sequences.

A308419 Stopping time for Recamán-like iteration of each n: a(0) = n, a(k) = a(k-1) - k if positive and not already in the sequence, a(k) = a(k-1) + k if not already in the sequence, otherwise stop.

Original entry on oeis.org

24, 24, 13, 21, 3, 3, 3, 15, 6, 6, 6, 15, 12, 9, 9, 9, 16, 20, 15, 12, 12, 12, 8, 10, 12, 20, 15, 15, 15, 10, 15, 24, 22, 26, 18, 18, 18, 11, 13, 18, 29, 28, 27, 21, 21, 21, 15, 13, 19, 17, 25, 31, 23, 24, 24, 24, 16, 18, 20, 21
Offset: 0

Author

Kevin J. Gomez, May 25 2019

Keywords

Comments

a(0) is the index of the first repeated value in Recamán's sequence (A005132).
a(n) appears to grow like sqrt(2n).

Examples

			For n = 8, the Recamán-like sequence generated is 8, 7, 5, 2, 6, 1; the sequence halts after a(8) = 6 terms since 1 - 6 = -5 is negative and 1 + 6 = 7 is already in the sequence.
		

Crossrefs

Iteration rule nearly identical to A005132.
A334219 is essentially the same sequence.

Programs

  • Python
    def seqr(n):
        sequence = [n]
        i = 1
        while True:
            if n - i > 0 and n - i not in sequence:
                n -= i
                sequence.append(n)
            elif n + i not in sequence:
                n += i
                sequence.append(n)
            else:
                break
            i += 1
        return len(sequence)
    print([seqr(n) for n in range(1000)])

Formula

a(n) >= ceiling((sqrt(1 + 8*n)-1)/2). - Markel Zubia, May 03 2025

A262086 Numbers k such that phi(k + 10) = phi(k) + 10, where phi(k) = A000010(k) is Euler's totient function.

Original entry on oeis.org

3, 7, 13, 19, 31, 36, 37, 43, 61, 73, 79, 97, 103, 127, 139, 157, 163, 181, 223, 229, 241, 271, 283, 307, 337, 349, 373, 379, 409, 421, 433, 439, 457, 499, 547, 577, 607, 631, 643, 673, 691, 709, 733, 751, 787, 811, 829, 853, 877, 919, 937, 967
Offset: 1

Author

Kevin J. Gomez, Sep 10 2015

Keywords

Comments

The only composite term less than 10^11 is 36. - Giovanni Resta, Sep 14 2015

Examples

			3 is in the sequence since phi(13) = phi(3) + 10.
		

Crossrefs

Cf. A001838 (k=2), A056772 (k=4), A262084 (k=6), A262085 (k=8), this sequence (k=10).

Programs

  • Magma
    [n: n in [1..1000] | EulerPhi(n+10) eq EulerPhi(n)+10]; // Vincenzo Librandi, Sep 11 2015
    
  • Mathematica
    Select[Range@1000, EulerPhi@(# + 10) == EulerPhi[#] + 10 &] (* Vincenzo Librandi, Sep 11 2015 *)
  • PARI
    is(n)=eulerphi(n + 10) == eulerphi(n) + 10 \\ Anders Hellström, Sep 11 2015

A262085 Numbers n such that phi(n + 8) = phi(n) + 8 where phi(n) = A000010(n) is Euler's totient function.

Original entry on oeis.org

3, 5, 11, 23, 24, 29, 36, 42, 48, 50, 53, 56, 59, 71, 72, 80, 89, 101, 102, 125, 131, 132, 149, 173, 176, 191, 230, 233, 248, 263, 269, 359, 368, 389, 401, 431, 449, 464, 479, 491, 563, 569, 593, 599, 638, 653, 656, 683, 701, 719, 743, 761, 821, 848, 911, 929, 983
Offset: 1

Author

Kevin J. Gomez, Sep 10 2015

Keywords

Comments

Sequence includes numbers n such that n and n + 8 are both prime (A023202).
Sequence also includes numbers n equal to 8*(a Mersenne prime) (cf A000668).
Sequence also includes n such that n/16 and n/8 + 1 are both odd primes.
Contains more composites than sequences A262084 and A262086. This is most likely due to the fact that 8 is a power of 2, as in A001838.

Examples

			3 since phi(11) = phi(3) + 8 (3 and 11 are both prime).
24 is a solution since phi(32) = phi(24) + 8 (24 is 8 * 3; 3 is a Mersenne prime).
		

Crossrefs

Cf. A000010.
Cf. A001838 (k=2), A056772 (k=4), A262084 (k=6), A262086 (k=10).

Programs

  • Magma
    [n: n in [1..1000] | EulerPhi(n+8) eq EulerPhi(n)+8]; // Vincenzo Librandi, Sep 11 2015
    
  • Maple
    select(t -> numtheory:-phi(t+8) = numtheory:-phi(t)+8, [$1..1000]); # Robert Israel, Mar 04 2016
  • Mathematica
    Select[Range@1000, EulerPhi@(# + 8)== EulerPhi[#] + 8 &] (* Vincenzo Librandi, Sep 11 2015 *)
  • PARI
    is(n)=eulerphi(n + 8) == eulerphi(n) + 8 \\ Anders Hellström, Sep 11 2015
    
  • Sage
    [n for n in (1..1000) if euler_phi(n+8) == euler_phi(n)+8] # Bruno Berselli, Mar 04 2016

A262084 Numbers m that satisfy the equation phi(m + 6) = phi(m) + 6 where phi(m) = A000010(m) is Euler's totient function.

Original entry on oeis.org

5, 7, 11, 13, 17, 21, 23, 31, 37, 40, 41, 47, 53, 56, 61, 67, 73, 83, 88, 97, 98, 101, 103, 107, 131, 136, 151, 152, 156, 157, 167, 173, 191, 193, 223, 227, 233, 237, 248, 251, 257, 263, 271, 277, 296, 307, 311, 328, 331, 347, 353, 367, 373, 376, 383, 433, 443
Offset: 1

Author

Kevin J. Gomez, Sep 10 2015

Keywords

Comments

The majority of solutions can be predicted by known properties of the equality. There are several solutions that do not fit these parameters.
An odd natural number m is a solution if m and m + 6 are both prime (sexy primes) (A023201).
Among the solutions for even natural numbers are all m = 8*p with odd primes p such that 4*p+3 is a prime number. Proof: From A000010 we can learn that the formula phi(p*2) = floor(((2 + p - 1) mod p)/(p - 1)) + p - 1 is known. If we define p = 4*q+3 and m = 8*q and insert, we will obtain phi(8*q+6) = 4*q+2. Also it is known that phi(8*q) = 4*q-4 if q is any odd prime. - Thomas Scheuerle, Dec 20 2024

Examples

			5 is a term since phi(5+6) = 10 = 6 + 4 = phi(5) + 6.
		

Crossrefs

Cf. A001838 (k=2), A056772 (k=4), A262085 (k=8), A262086 (k=10).

Programs

  • Magma
    [n: n in [1..500] | EulerPhi(n+6) eq EulerPhi(n)+6]; // Vincenzo Librandi, Sep 11 2015
    
  • Mathematica
    Select[Range@500, EulerPhi@(# + 6)== EulerPhi[#] + 6 &] (* Vincenzo Librandi, Sep 11 2015 *)
  • PARI
    is(n)=eulerphi(n + 6) == eulerphi(n) + 6 \\ Anders Hellström, Sep 11 2015
  • Sage
    [n for n in [1..1000] if euler_phi(n+6)==euler_phi(n)+6] # Tom Edgar, Sep 10 2015