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.

A346268 a(n) is the smallest positive number not yet in a(0..n-1) such that the absolute differences of order k = 1 .. n-1 of a(0..n) contain a maximum of k-1 duplicate values. We define a(0) = 1.

This page as a plain text file.
%I A346268 #26 Aug 17 2021 12:57:15
%S A346268 1,2,4,7,12,3,9,20,40,36,5,26,18,47,115,13,6,19,44,94,193,87,60,48,84,
%T A346268 170,355,31,14,63,25,119,71,187,444,34,8,42,98,211,450,100,10,62,132,
%U A346268 116,274,763,50,22,73,244,792,92,1502,5433,27,17,41,117,77,206,540,1315
%N A346268 a(n) is the smallest positive number not yet in a(0..n-1) such that the absolute differences of order k = 1 .. n-1 of a(0..n) contain a maximum of k-1 duplicate values. We define a(0) = 1.
%C A346268 Absolute differences of order 1 means k1 = {abs(a(0)-a(1)), abs(a(1)-a(2)), ...} and of order 2: k2 = {abs(k1(0)-k1(1)), abs(k1(1)-k1(2)), ...}.
%C A346268 If we did not allow any duplicated values in k1, k2, ..., kn we would get a case where all k1 .. kn would be the same sequence and this sequence would be s(n) = 2^n. In the case of this sequence k1..kn are not equal but there is still a remarkably strong correlation between a(n), k1(n) and kn(n).
%C A346268 It appears that if a(n) = p then the greatest possible number a(n-1) would be 1 + p + 2^p. If true this would have the consequence that this sequence would be a permutation of the positive integers, because in the case of a(n) = p, n could then not be greater than p + 2^p.
%C A346268 It appears that the logarithmic plot of this sequence consists of straight-line segments attached to each other; this indicates intervals of exponential growth.
%C A346268 If this sequence is a permutation of positive integers, will all k1 .. kn then contain all positive integers at least once?
%H A346268 Thomas Scheuerle, <a href="/A346268/a346268.svg">Log plot of a(0..200)(blue), k1(0..200)(yellow) and k2(0..200)(orange) </a>
%e A346268 a(0..9) = {1,2,4,7,12,3,9,20,40,36} no duplicates.
%e A346268 k1(0..9) = {1,2,3,5,9,6,11,20,4,31} no duplicates.
%e A346268 k2(0..9) = {1,1,2,4,3,5,9,16,27,10} one duplicate 1.
%e A346268 k3(0..9) = {0,1,2,1,2,4,7,11,17,3} two duplicates 1 and 2.
%o A346268 (MATLAB)
%o A346268 function a = A346268(max_n)
%o A346268 a(1) = 1;
%o A346268 t_min = 2;
%o A346268     for n = 1:max_n
%o A346268         t = t_min;
%o A346268         while ~isok([a t])
%o A346268             t = t+1;
%o A346268         end
%o A346268         a = [a t];
%o A346268         if t == t_min+1
%o A346268             t_min = t+1;
%o A346268         end
%o A346268     end
%o A346268 end
%o A346268 function [ ok ] = isok( num )
%o A346268     ok = (length(num) == length(unique(num)));
%o A346268     dnum = num;
%o A346268     if ok
%o A346268         for k = 1:(length(num)-1)
%o A346268             dnum = abs(diff(dnum,1));
%o A346268             ok = ok && ((length(dnum) - length(unique(dnum))) < k);
%o A346268             if ~ok
%o A346268                 break;
%o A346268             end
%o A346268         end
%o A346268     end
%o A346268 end
%Y A346268 Cf. A035313, A327743, A005282.
%K A346268 nonn
%O A346268 0,2
%A A346268 _Thomas Scheuerle_, Jul 12 2021