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.

User: Volker Diels-Grabsch

Volker Diels-Grabsch's wiki page.

Volker Diels-Grabsch has authored 2 sequences.

A278316 Odd numbers n such that q(n)^2 = q(n^2) != 0, where q(n) is the digit product on base 10.

Original entry on oeis.org

1, 3, 661, 983, 2631, 2893, 12385, 12893, 14661, 18615, 27519, 35383, 36213, 38691, 46215, 49231, 83631, 87291, 92843, 113865, 116683, 123415, 129815, 136423, 139261, 152619, 161683, 162435, 166817, 178119, 194725, 244635, 247941, 254663, 274165, 276941
Offset: 1

Author

Volker Diels-Grabsch, Nov 18 2016

Keywords

Examples

			For n=3, a(3)=661: q(661)^2 = (6*6*1)^2 = 36^2 = 1296 = 4*3*6*9*2*1 = q(436921) = q(661^2).
		

References

  • Michael Huke, Solution to exercise psi-15 (German language article), WURZEL 11/2016, November 2016, page 252, http://wurzel.org/

Crossrefs

Odd terms of A256115. - Michel Marcus, Dec 04 2016

Programs

  • Mathematica
    Select[Range[1, 10^6, 2], And[MatchQ @@ #, Times @@ # != 0] &@{(Times @@ IntegerDigits@ #)^2, Times @@ IntegerDigits[#^2]} &] (* Michael De Vlieger, Dec 06 2016 *)
  • PARI
    pd(n) = my(d=digits(n)); prod(k=1, #d, d[k]);
    isok(n) = (n % 2) && (p = pd(n)^2) && (p == pd(n^2)); \\ Michel Marcus, Dec 04 2016

Extensions

More terms from Jon E. Schoenfield, Dec 02 2016

A228162 Number of bangbangs (!!) in shell substitution when starting with : '!!' and : "!!" '!!'.

Original entry on oeis.org

1, 2, 2, 3, 5, 17, 161, 15681, 159591041, 16866847940875521, 189345699699803478502456213711361
Offset: 0

Author

Volker Diels-Grabsch, Aug 16 2013

Keywords

Comments

Executing the following no-op commands in a unix shell (bash, dash or zsh)
: '!!'
: "!!" '!!'
followed by repeated execution of the last command (arrow-up, enter) leads to a series of substitutions due to the !! (bangbang) operator:
: ": '!!'" '!!'
: ": ': ": '!!'" '!!''" '!!'
: ": ': ": '!!'" ': ": ': ": '!!'" '!!''" '!!'''" '!!'
These commands show a very irregular pattern as some of the single-quotes (') and double quotes(") switch their role from string delimiters to string contents and vice versa.
Also, these commands grow very fast. After a few repetitions, they'll quickly fill the RAM as well as the hard disk (because of the command history file).
This sequence describes the number of bangbangs (!!) of each command.

Examples

			For n = 4 the value a(4) = 5 is the number of bangbangs (!!) in the following command:
: ": ': ": '!!'" ': ": ': ": '!!'" '!!''" '!!'''" '!!'
		

Programs

  • Python
    for i, ai in enumerate([1, 2, 2, 3, 5]):
        print('%d %d' % (i, ai))
    p, q = 2, 4
    for i in range(5, 15):
        print('%d %d' % (i, 4*p + 2*q + 1))
        p, q = 3*p*p + 2*p + p*q, 2*p*p + 2*p*q + 2*q

Formula

a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3, a(4) = 5, and for n >= 5, a(n) = 4*p(n) + 2*q(n) + 1 where p(5) = 2, q(5) = 4, and p(n+1) = 3*p(n)^2 + 2*p(n) + p(n)*q(n) and q(n+1) = 2*p(n)^2 + 2*p(n)*q(n) + 2*q(n).