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

A171934 Backwards van Eck transform of A000010.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 3, 2, 2, 0, 2, 0, 5, 0, 1, 0, 4, 0, 4, 8, 11, 0, 4, 0, 5, 8, 2, 0, 6, 0, 15, 8, 2, 0, 8, 0, 11, 4, 6, 0, 6, 0, 11, 6, 23, 0, 8, 6, 6, 0, 7, 0, 16, 14, 4, 20, 29, 0, 12, 0, 31, 6, 13, 0, 16, 0, 4, 0, 14, 0, 2, 0, 11, 20, 2, 16, 6, 0, 12, 0, 7, 0, 6, 0, 37, 0, 6, 0, 6, 18, 23, 16, 47
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2010

Keywords

Comments

Given a sequence a, the backwards van Eck transform b is defined as follows: If a(n) has already appeared in a, let a(m) be the most recent occurrence, and set b(n)=n-m; otherwise b(n)=0. (Comment from A171899).

Crossrefs

Programs

  • Mathematica
    Block[{a = Array[EulerPhi, 94], b = {}, m}, Do[If[! IntegerQ[m[#]], Set[m[#], i]; AppendTo[b, 0], AppendTo[b, i - m[#]]; Set[m[#], i]] &@ a[[i]], {i, Length[a]}]; b] (* Michael De Vlieger, Apr 06 2021 *)
  • PARI
    up_to = 105;
    backVanEck_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = i-pp, outvec[i] = 0); mapput(om,invec[i],i)); outvec; };
    v171934 = backVanEck_transform(vector(up_to,n,eulerphi(n)));
    A171934(n) = v171934[n]; \\ Antti Karttunen, Apr 06 2021
Showing 1-1 of 1 results.