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.

A099507 a(n) is such that A099506(a(n)) = n.

This page as a plain text file.
%I A099507 #9 Apr 25 2016 12:05:01
%S A099507 1,4,2,6,17,3,10,5,12,7,14,53,9,8,11,22,13,24,15,26,99,103,28,107,30,
%T A099507 19,32,111,16,23,18,25,42,20,29,46,31,48,33,50,209,35,211,56,37,58,
%U A099507 217,39,60,21,41,64,43,66,245,45,72,47,74,49,27,51,34,267,80,36,82,277,38,57
%N A099507 a(n) is such that A099506(a(n)) = n.
%C A099507 a(199) > 10^6 if it exists. - _Robert Israel_, Jun 17 2015
%H A099507 Robert Israel, <a href="/A099507/b099507.txt">Table of n, a(n) for n = 1..198</a>
%H A099507 Robert Israel, <a href="/A099507/a099507.txt">Table of n, a(n) for n = 1..10000</a> with 0 for entries greater than 10^6 (if they exist at all)
%e A099507 Gives the positions in the sequence A099506 at which the integers n>0 appear. That sequence begins: 1,3,6,2,8,4,... so a(1)=1, a(2)=4, a(3)=2, etc.
%o A099507 (MATLAB)
%o A099507 N = 10^6;
%o A099507 M = 10*N;  % search up to A099506(N) while A099507 < M
%o A099507 % returns 0 for entries not found
%o A099507 B = zeros(1, M);
%o A099507 A = zeros(1, N);
%o A099507 A(1) = 1;
%o A099507 B(1) = 1;
%o A099507 for n = 2:N
%o A099507   t = mod(-A(n-1)-1,n)+1;
%o A099507   bm = t + [0:floor((M-t)/n)]*n;
%o A099507   bz = find(B(bm)==0,1);
%o A099507   if numel(bz)==0
%o A099507       break
%o A099507   end
%o A099507   m = t + n*(bz-1);
%o A099507   A(n) = m;
%o A099507   B(m) = n;
%o A099507 end;
%o A099507 B(1:1000) % _Robert Israel_, Jun 17 2015
%Y A099507 Cf. A099506.
%K A099507 easy,nonn
%O A099507 1,2
%A A099507 Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 20 2004