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

A360995 a(1)=0, a(2)=4, and thereafter a(n) is the smallest unused difference between two numbers whose product is equal to a(n-1)*a(n-2).

Original entry on oeis.org

0, 4, 1, 3, 2, 5, 9, 12, 23, 11, 252, 19, 13, 6, 7, 41, 34, 65, 31, 142, 111, 139, 28, 264, 46, 40, 57, 17, 32, 15, 14, 29, 51, 22, 49, 27, 42, 33, 45, 84, 16, 10, 36, 18, 63, 67, 180, 44, 38, 54, 21, 117, 24, 77, 53, 360, 39, 66, 73, 113, 8248, 127, 1554, 137
Offset: 1

Views

Author

Neal Gersh Tolunsky, Feb 27 2023

Keywords

Examples

			To find a(8), we look at the last two terms of the sequence so far (0,4,1,3,2,5,9). Their product 5*9=45 can be expressed as factor pairs (1,45), (3,15), (5,9) of which 3 and 15 have the smallest unused difference (12). We cannot use 9-5=4 because 4 is already in the sequence, so a(8)=12.
		

Crossrefs

Cf. A359035.

Programs

  • Maple
    S:= {0,4,1}:
    R:= 0,4,1:
    for n from 4 to 100 do
      s:= R[-1]*R[-2];
      cands:= select(type,map(t -> s/t - t, numtheory:-divisors(s)),posint) minus S;
      if cands = {} then printf("Sequence stops at n = %d\n",n); break fi;
      x:= min(cands);
      R:= R,x;
      S:= S union {x};
    od:
    R; # Robert Israel, Mar 01 2023
  • Mathematica
    K = {0, 4, 1}; For[a = 4, a < 65, a++, If[q == 0, Print["Finite List, length ", Length[K]]; Break[]]; d = Divisors[K[[a - 1]]*K[[a - 2]]]; If[OddQ[Length[d]], d = Delete[d, (Length[d] + 1)/2]]; For[q = Length[d]/2, q > 0, q--, If[!MemberQ[K, d[[Length[d] - q + 1]] - d[[q]]], AppendTo[K, d[[Length[d] - q + 1]] - d[[q]]]; Break[]]]]; Print[K] (* Samuel Harkness, Feb 28 2023 *)

A368103 a(1)=1; for n>1, a(n) is the smallest number not already used which has a factor difference in common with a(n-1).

Original entry on oeis.org

1, 4, 9, 16, 7, 27, 40, 10, 18, 8, 3, 15, 24, 6, 2, 12, 5, 21, 32, 45, 13, 28, 54, 26, 42, 20, 30, 14, 36, 17, 57, 80, 35, 48, 23, 75, 11, 39, 56, 72, 22, 46, 94, 144, 19, 63, 88, 43, 135, 55, 91, 112, 25, 49, 64, 31, 99, 120, 38, 60, 29, 93, 128, 33, 65, 84, 41, 129, 176, 50, 66, 92, 141, 192
Offset: 1

Views

Author

Neal Gersh Tolunsky, Dec 11 2023

Keywords

Comments

A factor difference of x is any abs(p-q) where x=p*q (in other words, the difference of a factor pair of x, per A368312).
Prime numbers are among the numbers which appear most delayed in this sequence. - Thomas Scheuerle, Dec 12 2023

Examples

			For n=2, a(1)=1 can be factored only as 1*1, which has difference 0. The next term cannot be 2 and 3 as they do not have a factor difference 0, but 4 = 2*2 does, so that a(2) = 4.
For n=5, a(4)=16 has factor differences 0,6,15 and the smallest unused number with one of those differences is a(5) = 7 = 7*1 difference 6.
		

Crossrefs

Cf. A368312.
Cf. A368059 (with factor sums), A359035, A360995.

Programs

  • MATLAB
    % See Scheuerle link.
Showing 1-2 of 2 results.