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.

A276342 Left inverse of A274647.

This page as a plain text file.
%I A276342 #32 Sep 30 2016 13:13:00
%S A276342 0,1,4,2,203,2597,3,5,16,14,12,10,8,6,97,15546,243575589,404450,23,
%T A276342 404448,7,9,11,13,15,17,56,54,52,50,631,629,902,137,135,192,84974,
%U A276342 84972,27,309411696,131,22,20,18,85,111320883,127,125
%N A276342 Left inverse of A274647.
%C A276342 If A274647 is proved to be a permutation, then this is full inverse of it, and the hypothetical -1's are in that case unnecessary (or can be used as markers for yet unknown values).
%H A276342 Hugo van der Sanden, <a href="/A276342/b276342.txt">Table of n, a(n) for n = 0..211</a>
%H A276342 Robert Israel, Hugo van der Sanden, Robert Gerbicz, and Benjamin Chaffin <a href="/A276342/a276342_3.txt">Table of a(n) for n = 0..10000</a>. This is based on A274647(n) for n <= 5.4*10^11. The 177 entries of -1 may correspond to values > 5.4*10^11 (first such value is at a(212)).
%F A276342 a(n) = index of n in A274647 or -1 if n is not present in that sequence.
%F A276342 For all n >= 0, a(A274647(n)) = n.
%p A276342 N = 10^6: # to search A274647(n) for n <= N
%p A276342 A[0]:= 0:B[0]:= 0:
%p A276342 for n from 1 to N do
%p A276342   for k from 1 do
%p A276342      r:= A[n-1]-k*n;
%p A276342      if r > 0 and not assigned(B[r]) then
%p A276342         break
%p A276342      fi;
%p A276342      r:= A[n-1]+k*n;
%p A276342      if not assigned(B[r]) then
%p A276342         break
%p A276342      fi
%p A276342   od;
%p A276342   A[n]:= r;
%p A276342   B[r]:= n;
%p A276342 od:
%p A276342 seq(B[n],n=0..100); # _Robert Israel_, Sep 04 2016
%o A276342 (Scheme) ;; Use the Scheme-code given in A274647. First one needs to compute A274647 up to some high value of n before trying to list terms of this sequence.
%Y A276342 Cf. A274647, A005132.
%K A276342 sign
%O A276342 0,3
%A A276342 _Antti Karttunen_, Sep 04 2016
%E A276342 More terms and updated a-file from _Hugo van der Sanden_, Sep 05 2016
%E A276342 Updated a-file from _Robert Gerbicz_, Sep 09 2016
%E A276342 Updated a-file from _Benjamin Chaffin_, Sep 29 2016