Stealing sequences: Robbers

5

This is . This is the Robbers thread. For the cops thread, go here.

I've noticed a number of OEIS challenges since I joined the site. It seems only fair that we have a cops-and-robbers challenge that determines who is the master of online integer sequences, once and for all.

Cops

Write a program or function that, given no input, deterministically prints any sequence from the OEIS. By deleting some subset of the characters, your program must be able to print a different OEIS sequence when run in the same language. The new sequence must be entirely new, not just the first by a different name or with a different offset. Neither sequence may be simply a repeated constant value.

You must provide the first function, along with the name of the OEIS sequence so correctness can be verified. It's OK if behavior gets questionable around your language's MAX_INT value or 256, whichever is larger.

Robbers

Delete characters from some Cop's submission such that your new program outputs any other sequence from the OEIS. Provide the new function along with the name of the new OEIS sequence. Your new sequence may not simply be a repeated constant value.

It's in your best interest to delete as many characters from the Cop's submission as possible. If another robber (anyone except the Cop who authored the original program) comes along and finds a shorter solution that finds another different sequence, that robber steals your point. (Note that simply golfing off characters and printing the same sequence is not sufficient to steal the point.)

Rules & Scoring

If, after one week, nobody has been able to crack your solution, you can mark your solution as safe by providing the second program along with the name of the sequence it generates.

You get one point for each safe posting and one point for each submission you crack. Note that another robber can steal your point from the cracked submission at any time by providing a shorter program that yields a different sequence.

Cops may only post one challenge per language.

The player with the most points at 12:00 UTC on 7 July wins.

vroomfondel

Posted 2017-06-23T16:55:19.090

Reputation: 2 094

Be warned that languages exist where MAX_INT is 1. You should probably require at least 256. – CalculatorFeline – 2017-06-23T16:59:51.557

Answers

5

C (gcc), Govind Parmar 142 bytes deleted

Golfed more thanks to @StephenS. I'm not sure it matters, but just for the spirit of the site!

#include<stdio.h>
#include<limits.h>
main(){int i,n;for(i=0;i<INT_MAX;i++){n=i;printf("%d,",n);}}

Try it online!

Sequence: A001477

nmjcman101

Posted 2017-06-23T16:55:19.090

Reputation: 3 274

1

I swear you had posted something different the first time I looked. Anyway, here is it golfed down more: try it online

– Stephen – 2017-06-23T18:26:23.147

2

PHP, Jörg Hülsermann, 1 byte deleted

for(;;)echo+$i,",";

Produces A000004

Peter Taylor

Posted 2017-06-23T16:55:19.090

Reputation: 41 901

2

MarioLANG, marcosm, 13 bytes deleted

>+:<
===#=

Try it online!

A109613.

Leaky Nun

Posted 2017-06-23T16:55:19.090

Reputation: 45 011

how do you get the +: part only by deleting? – marcosm – 2017-06-23T19:02:35.077

@marcosm The + is from the first line, and the : from the second line. – Leaky Nun – 2017-06-23T19:03:01.627

great! understood now – marcosm – 2017-06-23T19:06:16.270

2

cQuents, Stephen S, 1 byte deleted

=0,11:z+y

A022345.

Leaky Nun

Posted 2017-06-23T16:55:19.090

Reputation: 45 011

1

PHP, Jörg Hülsermann, 5 bytes deleted, Non-Competing

for(;;)echo+$i;

Produces A000004

juniorRubyist

Posted 2017-06-23T16:55:19.090

Reputation: 875

Peter Taylor currently holds the point, since your solution provides the same sequence. – vroomfondel – 2017-06-23T17:48:36.250

Dang it. I missed that point. – juniorRubyist – 2017-06-23T17:53:26.407

Still, it's a good example of how easy it is to overlook significant savings, so +1 from me. – Peter Taylor – 2017-06-23T18:05:11.483

1

Python 2, juniorRubyist, 253 bytes deleted

while True:print 6,4

Try it online!

Not sure how valid this is, because of the newlines, but I believe whitespace is irrelevant. TIL that if I could add a comma at the end, it would fix the whitespace.

A226294

Stephen

Posted 2017-06-23T16:55:19.090

Reputation: 12 293

Isn't this a constant sequence? – juniorRubyist – 2017-06-26T02:05:19.540

@juniorRubyist as far as I can tell, OP currently only bans constant sequences that only output the same value - the exact words are Neither sequence may be simply a repeated constant value.. a seems to me to mean one. If OP actually means an alternating pattern I'll delete my answer. – Stephen – 2017-06-26T02:15:36.227

@StephenS while non-periodic sequences are somehow more "interesting" I can't ban periodic sequences since I'm sure there are plenty of sequences in oeis whose periodicity is unknown. So this is a legal answer. The whitespace is fine. – vroomfondel – 2017-06-26T12:21:23.550

0

Python 2, juniorRubyist, 114 bytes deleted cracked

import zlib, base64;exec(zlib.decompress(base64.b64decode('eJzLtDUAAAHoANc=')))
while True:print i,;exec(zlib.decompress(base64.b64decode('eJzL1LY1BAAC1AED')))

Try it online!

A001477.

nore

Posted 2017-06-23T16:55:19.090

Reputation: 436