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.

A163875 a(n)=n-a(a(n-4)) with a(0)=a(1)=a(2)=a(3)=0.

This page as a plain text file.
%I A163875 #10 Jan 06 2025 04:53:23
%S A163875 0,0,0,0,4,5,6,7,4,4,4,4,8,9,10,11,12,13,14,15,12,12,12,12,16,17,18,
%T A163875 19,16,16,16,16,20,21,22,23,24,25,26,27,24,24,24,24,28,29,30,31,32,33,
%U A163875 34,35,32,32,32,32,36,37,38,39,36,36,36,36,40,41,42,43,44,45,46,47,44,44
%N A163875 a(n)=n-a(a(n-4)) with a(0)=a(1)=a(2)=a(3)=0.
%C A163875 A very near generalization of the Hofstadter G-sequence A005206 since it is part of the following family of sequences (which would give for k=1 the original G-sequence):
%C A163875 a(n)=n-a(a(n-k)) with a(0)=a(1)=...=a(k-1)=0 with k=1,2,3... (here k=4) - for general information about that family see A163873) Every a(n) occurs either exactly one or exactly five times (except from the initial values). A block of five occurrences of the same number n is after the first one interrupted by the following three elements: n+1,n+2 and n+3 (e.g. see from a(16) to a(23): 12, 13, 14, 15, 12, 12, 12, 12).
%C A163875 Since every natural number occurs in the sequence at least once and 0<=a(n)<=n for all n the elements can be ordered in such a way that every n is connected to its a(n) in a tree structure so that:
%C A163875 ..a..
%C A163875 ..|..
%C A163875 .a(n)
%C A163875 This will give for the first 55 elements the following (quintary) tree:
%C A163875 ..............................4...................
%C A163875 ...................../.../....|....\...\..........
%C A163875 .................../.../......|......\...\........
%C A163875 ......................8.......9.......10..11......
%C A163875 ..................../.........|........\....\.....
%C A163875 ..................12.........13.........14...15...
%C A163875 ................./...\\\\..../........../.../.....
%C A163875 ................/...__\_\\\_/........../.../......
%C A163875 .............../.../..__\_\_\\________/.../.......
%C A163875 ............./..../../.___\_\_\_\________/........
%C A163875 .........../...../.././....\.\.\..\...............
%C A163875 .........16.....17.18.19..20.21.22.23.............
%C A163875 ......../\\\\__/__/__/__...\..\..\..\.............
%C A163875 ......./..\\\_/__/__/_..\...\..\..\..\............
%C A163875 ....../....\\/__/__/_.\..\...\...\..\..\..........
%C A163875 ...../......X__/__/_.\.\..\...\...\..\..\.........
%C A163875 ..../....../../../..\.\.\..\...\....\..\..\.......
%C A163875 ...24....25.26.27..28.29.30.31.32....33.34.35.....
%C A163875 ../\\\\__/__/__/__...|.|..|.|..\\\\_/__/__/__.....
%C A163875 ./..\\\_/__/__/_..\..\.\..|.|..|\\\/__/__/__.\....
%C A163875 |....\\/__/__/_.\..\..\.\.|./..|.\X__/__/__.\.\...
%C A163875 |.....X__/__/_.\.\..\..\.\\/...|./\__|_|__.\.\.\..
%C A163875 |..../../../..\.\.\..\..\.\/...|.|...|.|..\.\.\.\.
%C A163875 36.27.38.39..40.41.42.43..44..48.49.50.51.52.\54.\
%C A163875 ...........................45................53.55
%C A163875 ...........................46.....................
%C A163875 ...........................47.....................
%C A163875 (X means two crossing paths)
%C A163875 Conjecture: This features a certain structure (similar to the G-sequence A005206 or other sequences of this family: A163874 and A163873). If the (below) following two constructs (C and D) are added on top of their ends (either marked with C or D) one will (if starting with one instance of D) receive the above tree (x marks a node, o marks spaces for nodes that are not part of the construct but will be filled by the other construct):
%C A163875 Diagram of D:
%C A163875 ......x.............
%C A163875 ..../..\\\\.........
%C A163875 .../....\\\.\.......
%C A163875 ..|......\\.\.\.....
%C A163875 ..|.......\.\.\.\...
%C A163875 ..|........\.\.\.\..
%C A163875 ..D..o.o.o..x.x.x.x.
%C A163875 ............|.|.|.|.
%C A163875 ............D.C.C.C.
%C A163875 (o will be filled by C)
%C A163875 Diagram of C:
%C A163875 \\\..x..
%C A163875 \\\\/...
%C A163875 .\\/\...
%C A163875 ../\\\..
%C A163875 ./.\\\\.
%C A163875 C...\\\\
%C A163875 (This means construct C crosses on its way from a(n) to n exactly four other paths, e.g. from 18 to 26)
%H A163875 Paolo Xausa, <a href="/A163875/b163875.txt">Table of n, a(n) for n = 0..10000</a>
%t A163875 A163875[n_] := A163875[n] = If[n < 4, 0, n - A163875[A163875[n-4]]];
%t A163875 Array[A163875, 100, 0] (* _Paolo Xausa_, Jan 05 2025 *)
%K A163875 nonn
%O A163875 0,5
%A A163875 Daniel Platt (d.platt(AT)web.de), Aug 08 2009
%E A163875 Terrible typos here and in A163874 and A163873! Corrected the sequence definition. Two further changes will be requested soon. A thousand apologies for the inconvenience Daniel Platt (d.platt(AT)web.de), Sep 14 2009