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: K. Spage

K. Spage's wiki page.

K. Spage has authored 8 sequences.

A243115 Starting values of the reduced Collatz function (A014682) where 2 to the power of the "dropping time" is greater than the starting value.

Original entry on oeis.org

3, 7, 11, 15, 23, 27, 31, 39, 47, 59, 63, 71, 79, 91, 95, 103, 111, 123, 127, 155, 159, 167, 175, 191, 199, 207, 219, 223, 231, 239, 251, 255, 283, 287, 303, 319, 327, 347, 359, 367, 383, 411, 415, 423, 447, 463, 479, 487, 495, 507, 511, 539, 543, 559, 575
Offset: 1

Author

K. Spage, Aug 20 2014

Keywords

Comments

a(n) is the lowest positive starting value of the reduced Collatz function such that all starting values (>1) that are congruent to a(n) (mod 2^d) have the same dropping time (d). The dropping time here counts the (3x+1)/2 and the x/2 steps as listed in A126241. A number is included in this sequence if 2^A126241(a(n)) > a(n).
Starting values that produce new record dropping times as listed in A060412 are necessarily a subset of this sequence.
If at least one iteration is carried out before checking that the absolute iterated value has become less than or equal to the absolute starting value, then a(n) is the lowest positive starting value such that all starting values (positive, zero or negative) that are congruent to a(n) (mod 2^d) have the same dropping time (d). Defined like this, the sequence would start with 0, 1, 3, 7.
For k>0, A076227(k) is the number of terms between 2^k and 2^(k+1)-1. - Ruud H.G. van Tol, Dec 18 2022
All terms are congruent to 3 (mod 4) since any 1 (mod 4) has dropping time A126241(4k+1) = 2, for k>=1. - Ruud H.G. van Tol, Jan 11 2023

Examples

			3 is in this sequence because the dropping time starting with 3 is A126241(3) = 4 and 2^4 > 3.
		

Programs

  • PARI
    is(t)= if(t<3||3!=t%4,0,my(x=t, d=0); until(x<=t, if(x%2, x=(x*3+1)/2, x/=2); d++); 2^d>t); \\ updated by Ruud H.G. van Tol, Jan 10 2023

Extensions

Offset 1 from Ruud H.G. van Tol, Jan 10 2023

A245944 Irregular triangle read by rows of a variation of the Collatz iteration with signature (2,4).

Original entry on oeis.org

5, 8, 6, 6, 5, 8, 6, 7, 14, 9, 20, 12, 8, 6, 8, 6, 9, 20, 12, 8, 6, 10, 7, 14, 9, 20, 12, 8, 6, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6, 12, 8, 6, 13, 32, 18, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6, 14, 9, 20, 12, 8, 6
Offset: 1

Author

K. Spage, Aug 11 2014

Keywords

Comments

It is conjectured that the trajectory of this Collatz-like iteration arrives at 6 in a finite number of steps for any initial value x, (x>4). The iterative step is divide by 2 and add 2 if even, or multiply by 3 and subtract 7 if odd. For any even initial value the number of steps in the trajectory is the same as the number of steps in the Collatz trajectory starting with floor(x-4)/2.
This is one of a subset of Collatz-like variations with parameters a = 2 and b = (any positive or negative even integer). The halting value h for type (a=2, b:even) is given by h = 2 + b. Any even halting value can be chosen by selecting the appropriate value for b. For any sequence starting with an even number x, the halting value is arrived at in the same number of steps as the Collatz trajectory starting with (x-b)/2. The iterative function for variation type (a=2, b:even) is x -> (x/2 + b/2) if x is even or x -> (3*x - 2*b + 1) if x is odd.
Two variations belong to the same subset if their (a) parameters are the same and their (b) parameters have the same parity. It is conjectured that any variations belonging to the same subset have equal row lengths.
The subset is part of a wider class of Collatz variations uniquely identified by two parameters (a,b) where a or b can be any integer. The general formula for the halting value is h = 6^(b mod 2)*a + b + b mod 2; the general formula for the iterative mapping function is x -> (x/2 + ceiling(b/2)) if x is even and x -> (3*x - 2*b + a^(a mod 2)) if x is odd. The minimum starting value is b + 1 + b mod 2 for a = 1 or a = 2. Values of a other than 1 or 2 are not always "well behaved".

Examples

			Some initial rows of the irregular array (r,j):
r: j = (1, 2, 3, ... )
1: (5, 8, 6),
2: (6, 5, 8, 6),
3: (7, 14, 9, 20, 12, 8, 6),
4: (8, 6),
5: (9, 20, 12, 8, 6),
6: (10, 7, 14, 9, 20, 12, 8, 6),
7: (11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6),
8: (12, 8, 6),
9: (13, 32, 18, 11, 26, 15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6),
10: (14, 9, 20, 12, 8, 6),
11: (15, 38, 21, 56, 30, 17, 44, 24, 14, 9, 20, 12, 8, 6),
12: (16, 10, 7, 14, 9, 20, 12, 8, 6)
		

Crossrefs

Cf. A245942 for variation type (a=2, b:odd).
Cf. A245943 for variation type (a=1, b:even).
Cf. A242030 for variation type (a=1, b:odd).

Programs

  • PARI
    {for(n=5, 16, x=n; print1(x,", "); until(x==6, if(x%2,x=x*3-7,x=x/2+2);print1(x,", ")))} \\ Prints flattened triangle.
    
  • PARI
    variation(a,b) = {if(!(a==1||a==2), print("Enter a=1 or a=2"), h=6^(b%2)*a+b+b%2; c=ceil(b/2); d=2*-b+a^(a%2); for(r=1,12, x=r+b+b%2; print1(r,": (",x); until(x==h, if(x%2, x=3*x+d, x=x/2+c); print1(", ",x)); print("),")))} \\ Generalized version.
    {variation(2,4)} \\ Prints first 12 rows of this irregular array.

A245943 Irregular triangle read by rows of a variation of the Collatz iteration with signature (1,2).

Original entry on oeis.org

3, 6, 4, 3, 4, 3, 5, 12, 7, 18, 10, 6, 4, 3, 6, 4, 3, 7, 18, 10, 6, 4, 3, 8, 5, 12, 7, 18, 10, 6, 4, 3, 9, 24, 13, 36, 19, 54, 28, 15, 42, 22, 12, 7, 18, 10, 6, 4, 3, 10, 6, 4, 3, 11, 30, 16, 9, 24, 13, 36, 19, 54, 28, 15, 42, 22, 12, 7, 18, 10, 6, 4, 3
Offset: 1

Author

K. Spage, Aug 11 2014

Keywords

Comments

It is conjectured that the trajectory of this Collatz-like iteration arrives at 3 in a finite number of steps for any initial value x, (x>2). The iterative step is divide by 2 and add 1 if even, or multiply by 3 and subtract 3 if odd. For any initial value the number of steps in the trajectory is the same as the number of steps in the Collatz trajectory starting with (x-2).
This is one of a subset of Collatz-like variations with parameters a = 1 and b = (any positive or negative even integer). The halting value h for type (a=1, b:even) is given by h = a + b. Any odd halting value can be chosen by selecting the appropriate value for b. For any sequence the halting value is arrived at in the same number of steps as the Collatz trajectory starting with (x-b). The iterative function for subset type (a=1, b:even) is x -> (x/2+b/2) if x is even or x -> (3*x-2*b+1) if x is odd.
Two variations belong to the same subset if their (a) parameters are the same and their (b) parameters have the same parity. It is conjectured that any variations belonging to the same subset have equal row lengths. Members of the same subset share other properties. For example the trajectory of any variation of subset type (a=1, b:even) can be mapped to a Collatz trajectory by b from each element of the trajectory.
The variation with signature type (1,0) belongs to this subset and is in fact the classic Collatz sequence.
The subset is part of a wider class of Collatz variations uniquely identified by two parameters (a,b) where a or b can be any integer. The general formula for the halting value is h = 6^(b mod 2)*a + b + b mod 2; the general formula for the iterative mapping function is x -> (x/2 + ceiling(b/2)) if x is even and x -> (3*x - 2*b + a^(a mod 2)) if x is odd. The minimum starting value is b + 1 + b mod 2 for a = 1 or a = 2. Values of a other than 1 or 2 are not always "well behaved".

Examples

			Some initial rows of the irregular array (r,j):
r: j = (1, 2, 3, ... )
1: (3, 6, 4, 3),
2: (4, 3),
3: (5, 12, 7, 18, 10, 6, 4, 3),
4: (6, 4, 3),
5: (7, 18, 10, 6, 4, 3),
6: (8, 5, 12, 7, 18, 10, 6, 4, 3),
7: (9, 24, 13, 36, 19, 54, 28, 15, 42, 22, 12, 7, 18, 10, 6, 4, 3),
8: (10, 6, 4, 3),
9: (11, 30, 16, 9, 24, 13, 36, 19, 54, 28, 15, 42, 22, 12, 7, 18, 10, 6, 4, 3),
10: (12, 7, 18, 10, 6, 4, 3),
11: (13, 36, 19, 54, 28, 15, 42, 22, 12, 7, 18, 10, 6, 4, 3),
12: (14, 8, 5, 12, 7, 18, 10, 6, 4, 3)
		

Crossrefs

Cf. A245942 for variation type (a=2, b:odd).
Cf. A245944 for variation type (a=2, b:even).
Cf. A242030 for variation type (a=1, b:odd).

Programs

  • PARI
    {for(n=3, 14, x=n; print1(x,", "); until(x==3, if(x%2,x=x*3-3,x=x/2+1);print1(x,", ")))} \\ Prints flattened triangle.
    
  • PARI
    variation(a,b) = {if(!(a==1||a==2), print("Enter a=1 or a=2"), h=6^(b%2)*a+b+b%2; c=ceil(b/2); d=2*-b+a^(a%2); for(r=1,12, x=r+b+b%2; print1(r,": (",x); until(x==h, if(x%2, x=3*x+d, x=x/2+c); print1(", ",x)); print("),")))} \\ Generalized version.
    {variation(1,2)} \\ Prints first 12 rows of this irregular array.

A245691 Irregular triangle of Collatz like iteration, x -> 3x, then repeat (x -> ceiling(x/2) if divisible by 3, otherwise x -> 3x) while x != 6.

Original entry on oeis.org

1, 3, 2, 6, 2, 6, 3, 9, 5, 15, 8, 24, 12, 6, 4, 12, 6, 5, 15, 8, 24, 12, 6, 6, 18, 9, 5, 15, 8, 24, 12, 6, 7, 21, 11, 33, 17, 51, 26, 78, 39, 20, 60, 30, 15, 8, 24, 12, 6, 8, 24, 12, 6, 9, 27, 14, 42, 21, 11, 33, 17, 51, 26, 78, 39, 20, 60, 30, 15, 8, 24, 12
Offset: 1

Author

K. Spage, Aug 07 2014

Keywords

Comments

It is conjectured that the number of steps for the trajectory to arrive at 6 is equal to the number of steps for the Collatz trajectory to arrive at 1 for the same starting value n (n>1), suggesting the length of the n-th row of the irregular array is given by A008908(n). Note that if the starting value of a trajectory in the Collatz sequence is not treated as a potential stopping value, then the conjecture would also be valid for n = 1.
Starting with x the first step in this sequence is always to multiply by 3. Thereafter if x <> 6, divide by 2 (rounding up) if x mod 3 = 0, otherwise multiply by 3. If the initial multiply-by-3 step is omitted the sequence still arrives at 6 for any starting value (conjecturally), but the length of the trajectory would no longer be the same as the length of the Collatz trajectory for starting values (n>1) that are divisible by 3.
While any odd number in the classic Collatz trajectory is immediately followed by an even number, trajectories in this sequence may contain a contiguous run of odd numbers. The trajectory starting with 27 is the lowest with more odd numbers than even numbers in its sequence.

Examples

			The irregular array a(n,k) starts:
n\k   0   1   2   3   4    5   6    7   8   9  10  11  12  13  14  15  16  17  18  19 ...
1:    1   3   2   6
2:    2   6
3:    3   9   5  15   8   24  12    6
4:    4  12   6
5:    5  15   8  24  12    6
6:    6  18   9   5  15    8  24   12   6
7:    7  21  11  33  17   51  26   78  39   20  60  30  15   8  24  12   6
8:    8  24  12   6
9:    9  27  14  42  21   11  33   17  51   26  78  39  20  60  30  15   8  24  12   6
10:  10  30  15   8  24   12   6
11:  11  33  17  51  26   78  39   20  60   30  15   8  24  12   6
12:  12  36  18   9   5   15   8   24  12    6
13:  13  39  20  60  30   15   8   24  12    6
14:  14  42  21  11  33   17  51   26  78   39  20  60  30  15   8  24  12   6
15:  15  45  23  69  35  105  53  159  80  240 120  60  30  15   8  24  12   6
		

Crossrefs

Programs

  • PARI
    { for(n=1, 15, x=n*3; print1(n,", ",x,", "); while(x!=6, if(x%3, x*=3, x=ceil(x/2)); print1(x,", "))) }

A245690 a(n) = A245689(n) mod A053669(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 3

Author

K. Spage, Jul 29 2014

Keywords

Comments

The interesting aspect of this sequence is the sparsity of values of a(n) greater than 3. The first occurrence of a(n)=4 occurs at n=30030. Values of a(n)=4 appear to occur only at 30030*k where k is a positive integer that is not divisible by 2,3,17 or 19, but a proof is required.
The first occurrence of a(n) = 5 seems to be at n=23768741896345550770650537601358310. - Robert Israel, Jul 31 2014
Conjecture - Let f(x) be the value of n at the first occurrence of a(n) = x. It seems that f(x) for x>2 is always a primorial number (See A002110) and that subsequent values of a(n)=x occur at multiples of n = f(x). If this conjecture is true then:
f(3) = A002110(3) = 2*3*5 = 30.
f(4) = A002110(6) = 2*3*5*7*11*13 = 30030.
f(5) = A002110(24) = 23768741896345550770650537601358310.
f(6) = A002110(347).
f(7) = A002110(51).
f(8) = A002110(3022).
The values of n for f(x), x>5 are extremely large. For example n has 11926 digits for f(8).
Using f(x) notdiv (a,b,c...) as shorthand for multiples of f(x) that are not divisible by a, b, c ... it seems that a(n) = x occurs at:
f(4) notdiv (2, 3, 17, 19),
f(5) notdiv (3, 7, 10, 97, 101),
f(6) notdiv (2, 5, 27, 2347, 2351),
f(7) notdiv (2, 7, 11, 81, 239, 241),
f(8) notdiv (2, 3, 7, 15, 43, 27733, 27737, 27739)

Examples

			For n = 10, the smallest prime non-divisor of 10 is 3. The smallest divisor of 10 that is greater than 3 is 5. 5 mod 3 is 2 so a(10) = 2.
For n = 12, the smallest prime non-divisor of 12 is 5. The smallest divisor of 12 that is greater than 5 is 6. 6 mod 5 is 1 so a(12) = 1.
		

Crossrefs

Programs

  • Maple
    a:= proc(n)
    uses numtheory;
    local F,p,j;
    if n::odd then p:= 2
      else
      F:= map(pi,factorset(n));
      p:= ithprime(min(map(`+`,F,1) minus F));
    fi;
    for j from p+1 do if n mod j = 0 then return j mod p fi od;
    end proc:
    seq(a(n),n=3..100); # Robert Israel, Jul 31 2014
  • Mathematica
    A053669[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[CoprimeQ[n, p], Return[p]]]];
    A245689[n_] := SelectFirst[Divisors[n], # > A053669[n]&];
    A245690[n_] := Mod[A245689[n], A053669[n]];
    Table[A245690[n], {n, 3, 100}] (* Jean-François Alcover, May 15 2023 *)
  • PARI
    A053669(n) = {forprime(p=2, ,if(n%p, return(p)))}
    A245689(n) = {my(c=A053669(n)+1);if(isprime(n),n,while(n%c,c++);c)}
    A245690(n) = {A245689(n) % A053669(n)}

A242030 Irregular triangle read by rows of a variation of the Collatz iteration with signature (1,1).

Original entry on oeis.org

3, 8, 4, 3, 8, 5, 14, 8, 6, 4, 3, 8, 7, 20, 11, 32, 17, 50, 26, 14, 8, 8, 5, 14, 8, 9, 26, 14, 8, 10, 6, 4, 3, 8, 11, 32, 17, 50, 26, 14, 8, 12, 7, 20, 11, 32, 17, 50, 26, 14, 8, 13, 38, 20, 11, 32, 17, 50, 26, 14, 8, 14, 8, 15, 44, 23, 68, 35, 104, 53, 158
Offset: 1

Author

K. Spage, Aug 11 2014

Keywords

Comments

It is conjectured that the trajectory of this Collatz-like iteration arrives at 8 in a finite number of steps for any initial value x, (x>2). The iterative step is divide by 2 and add 1 if even, or multiply by 3 and subtract 1 if odd.
This is one of a subset of Collatz-like variations with parameters a = 1 and b = (any positive or negative odd integer). The halting value h for type (a=1, b:odd) is given by h = 6 + b + 1. Any odd halting value can be chosen by selecting the appropriate value for b. The iterative function for subset type (a=1, b:odd) is x -> (x/2+ceiling(b/2)) if x is even or x -> (3*x-2*b+1) if x is odd. Unlike the other subsets, there is no simple relationship between the row lengths and the Collatz sequence row lengths.
Two variations belong to the same subset if their (a) parameters are the same and their (b) parameters have the same parity. It is conjectured that any variations belonging to the same subset have equal row lengths.
The subset is part of a wider class of Collatz variations uniquely identified by two parameters (a,b) where a or b can be any integer. The general formula for the halting value is h = 6^(b mod 2)*a + b + b mod 2; the general formula for the iterative mapping function is x -> (x/2 + ceiling(b/2)) if x is even and x -> (3*x - 2*b + a^(a mod 2)) if x is odd. The minimum starting value is b + 1 + b mod 2 for a = 1 or a = 2. Values of a other than 1 or 2 are not always "well behaved".

Examples

			Some initial rows of the irregular array (r,j):
r: j = (1, 2, 3, ... )
1: (3, 8),
2: (4, 3, 8),
3: (5, 14, 8),
4: (6, 4, 3, 8),
5: (7, 20, 11, 32, 17, 50, 26, 14, 8),
6: (8, 5, 14, 8),
7: (9, 26, 14, 8),
8: (10, 6, 4, 3, 8),
9: (11, 32, 17, 50, 26, 14, 8),
10: (12, 7, 20, 11, 32, 17, 50, 26, 14, 8),
11: (13, 38, 20, 11, 32, 17, 50, 26, 14, 8),
12: (14, 8)
		

Crossrefs

Cf. A245942 for variation type (a=2, b:odd).
Cf. A245943 for variation type (a=1, b:even).
Cf. A245944 for variation type (a=2, b:even).

Programs

  • PARI
    {for(n=3, 14, x=n; print1(x,", "); until(x==8, if(x%2,x=x*3-1,x=x/2+1);print1(x,", ")))} \\ Prints flattened triangle.
    
  • PARI
    variation(a,b) = {if(!(a==1||a==2), print("Enter a=1 or a=2"), h=6^(b%2)*a+b+b%2; c=ceil(b/2); d=2*-b+a^(a%2); for(r=1,12, x=r+b+b%2; print1(r,": (",x); until(x==h, if(x%2, x=3*x+d, x=x/2+c); print1(", ",x)); print("),")))} \\ Generalized version.
    {variation(1,1)} \\ Prints first 12 rows of this irregular array.

A245942 Irregular triangle read by rows of a variation of the Collatz iteration with signature (2,3).

Original entry on oeis.org

5, 10, 7, 16, 6, 5, 10, 7, 16, 7, 16, 8, 6, 5, 10, 7, 16, 9, 22, 13, 34, 19, 52, 28, 16, 10, 7, 16, 11, 28, 16, 12, 8, 6, 5, 10, 7, 16, 13, 34, 19, 52, 28, 16, 14, 9, 22, 13, 34, 19, 52, 28, 16, 15, 40, 22, 13, 34, 19, 52, 28, 16, 16, 10, 7, 16, 17, 46, 25, 70
Offset: 1

Author

K. Spage, Aug 08 2014

Keywords

Comments

It is conjectured that the trajectory of this Collatz-like iteration arrives at 16 in a finite number of steps for any initial value x, (x>4). The iterative step is divide by 2 and add 2 if even, or multiply by 3 and subtract 5 if odd. For any odd initial value (x>6) the number of steps in the trajectory is the same as the number of steps in the Collatz trajectory starting with floor(x-3)/2.
This is one of a subset of Collatz-like variations with parameters a = 2 and b = (any positive or negative odd integer). The halting value h for type (a=2, b:odd) is given by h = 12 + b + 1. Any even halting value can be chosen by selecting the appropriate value for b. For any sequence starting with an odd number x, the halting value is arrived at in the same number of steps as the Collatz trajectory starting with floor((x-b)/2). The iterative function for variation type (a=2, b:odd) is x -> (x/2 + ceiling(b/2)) if x is even or x -> (3*x - 2*b + 1) if x is odd.
Two variations belong to the same subset if their (a) parameters are the same and their (b) parameters have the same parity. It is conjectured that any variations belonging to the same subset have equal row lengths. Members of the same subset share other properties. For example, if a trajectory of subset type (a=2, b:odd) starts with an odd number, then the function floor((x-b)/2) maps the element values (x) of this trajectory to a trajectory of A245691.
The subset is part of a wider class of Collatz variations uniquely identified by two parameters (a,b) where a or b can be any integer. The general formula for the halting value is h = 6^(b mod 2)*a + b + b mod 2; the general formula for the iterative mapping function is x -> (x/2 + ceiling(b/2)) if x is even and x -> (3*x - 2*b + a^(a mod 2)) if x is odd. The minimum starting value is b + 1 + b mod 2 for a = 1 or a = 2. Values of a other than 1 or 2 are not always "well behaved".

Examples

			Some initial rows of the irregular array (r,j):
r: j = (1, 2, 3, ... )
1: (5, 10, 7, 16),
2: (6, 5, 10, 7, 16),
3: (7, 16),
4: (8, 6, 5, 10, 7, 16),
5: (9, 22, 13, 34, 19, 52, 28, 16),
6: (10, 7, 16),
7: (11, 28, 16),
8: (12, 8, 6, 5, 10, 7, 16),
8: (13, 34, 19, 52, 28, 16),
10: (14, 9, 22, 13, 34, 19, 52, 28, 16),
11: (15, 40, 22, 13, 34, 19, 52, 28, 16),
12: (16, 10, 7, 16)
		

Crossrefs

Cf. A245691.
Cf. A245943 for variation type (a=1, b:even).
Cf. A245944 for variation type (a=2, b:even).
Cf. A242030 for variation type (a=1, b:odd).

Programs

  • PARI
    {for(n=5, 17, x=n; print1(x,", "); until(x==16, if(x%2,x=x*3-5,x=x/2+2);print1(x,", ")))} \\ Prints flattened triangle.
    
  • PARI
    variation(a,b) = {if(!(a==1||a==2), print("Enter a=1 or a=2"), h=6^(b%2)*a+b+b%2; c=ceil(b/2); d=2*-b+a^(a%2); for(r=1,12, x=r+b+b%2; print1(r,": (",x); until(x==h, if(x%2, x=3*x+d, x=x/2+c); print1(", ",x)); print("),")))} \\ Generalized version.
    {variation(2,3)} \\ Prints first 12 rows of this irregular array.

A245689 Smallest divisor of n that is greater than the smallest prime not dividing n (A053669(n)).

Original entry on oeis.org

3, 4, 5, 6, 7, 4, 3, 5, 11, 6, 13, 7, 3, 4, 17, 6, 19, 4, 3, 11, 23, 6, 5, 13, 3, 4, 29, 10, 31, 4, 3, 17, 5, 6, 37, 19, 3, 4, 41, 6, 43, 4, 3, 23, 47, 6, 7, 5, 3, 4, 53, 6, 5, 4, 3, 29, 59, 10, 61, 31, 3, 4, 5, 6, 67, 4, 3, 5, 71, 6, 73, 37, 3, 4, 7, 6, 79
Offset: 3

Author

K. Spage, Jul 29 2014

Keywords

Comments

Sequence is similar to A126800 but differs for the first time at n = 30 and thereafter at n = 30k, where k = 3, 5, 7, 9, 11, 13, 14, 15 ... The generating function for k is not known.
The sequence starts at n = 3 as there are no qualifying divisors for n = 1 or n = 2.

Examples

			For n = 30 the smallest prime not dividing n is 7 and the smallest divisor of 30 that is greater than 7 is 10, so a(30) = 10.
		

Crossrefs

Programs

  • Maple
    a:= proc(n)
    uses numtheory;
    local F,p;
    if n::odd then p:= 2
      else
      F:= map(pi,factorset(n));
      p:= ithprime(min(map(`+`,F,1) minus F));
    fi;
    min(select(`>`,divisors(n),p));
    end proc:
    seq(a(n),n=3..100); # Robert Israel, Jul 31 2014
  • Mathematica
    A053669[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[CoprimeQ[n, p], Return[p]]]];
    A245689[n_] := SelectFirst[Divisors[n], # > A053669[n]&];
    Table[A245689[n], {n, 3, 100}] (* Jean-François Alcover, May 15 2023 *)
  • PARI
    A053669(n)={forprime(p=2, ,if(n%p, return(p)))}
    A245689(n) ={my(c=A053669(n)+1);while(n%c,c++);c}

Formula

a(n) = n if n is an odd prime.