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: James D. Klein

James D. Klein's wiki page.

James D. Klein has authored 6 sequences.

A331560 Size of the palindrome-free intervals about the 196-iterates, A006960.

Original entry on oeis.org

11, 10, 110, 110, 100, 100, 110, 1100, 1000, 11000, 11000, 11000, 11000, 10000, 10000, 10000, 11000, 110000, 110000, 100000, 100000, 1100000, 1100000, 1100000, 1000000, 1000000, 11000000, 11000000, 10000000, 10000000, 110000000, 110000000, 110000000, 100000000
Offset: 1

Author

James D. Klein, Jan 20 2020

Keywords

Comments

By empirical observation, the integers in this sequence are of the form 10*10^n and 11*10^n, n >= 0, since they are the difference of consecutive palindromes surrounding the 196-iterates. (No differences of 2 observed.)

Examples

			191 < 196 < 202, 202 - 191 = 11;
878 < 887 < 888, 888 - 878 = 10; etc.
		

Crossrefs

Programs

  • Python
    # Palindrome-free interval about 196 offsets. Slow brute-force
    n = 196
    while n < 10**15:
         m = n
         while m != int(str(m)[::-1]): m+=1
         s = m
         m = n
         while m != int(str(m)[::-1]): m-=1
         print(s-m)
         n = n + int(str(n)[::-1])

Formula

a(n) = A331556(n) + A331557(n).

Extensions

a(31)-a(34) from Jinyuan Wang, Feb 29 2020

A331557 The upper (or right) offset of a 196-iterate (A006960) from the smallest palindrome greater than the iterate.

Original entry on oeis.org

6, 1, 96, 11, 48, 11, 10, 693, 732, 231, 110, 10901, 10901, 5600, 1100, 110, 1000, 12375, 108911, 96416, 99901, 470118, 110, 1089011, 999074, 110000, 2508495, 109901, 1770356, 11, 40076938, 99110000, 10901000, 56662095, 9911, 137056546, 1099890110, 545350309
Offset: 1

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 6 since 202-196 = 6;
The second term is 1 since 888-887 = 1; etc.
		

Crossrefs

Programs

  • Python
    # Upper 196 offsets. Slow brute force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=1
      print(m-n)
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331556(n).

Extensions

More terms from Jinyuan Wang, Feb 29 2020

A331556 The lower (or left) offset of a 196-iterate (A006960) from the largest palindrome less than the iterate.

Original entry on oeis.org

5, 9, 14, 99, 52, 89, 100, 407, 268, 10769, 10890, 99, 99, 4400, 8900, 9890, 10000, 97625, 1089, 3584, 99, 629882, 1099890, 10989, 926, 890000, 8491505, 10890099, 8229644, 9999989, 69923062, 10890000, 99099000, 43337905, 99990089, 962943454, 109890, 454649691
Offset: 1

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 5 since 196-191 = 5
The second term is 9 since 887-878 = 9, etc.
		

Crossrefs

Programs

  • Mathematica
    Map[Block[{k = # - 1}, While[k != IntegerReverse@ k, k--]; # - k] &, NestList[# + IntegerReverse[#] &, 196, 25]] (* brute force, or *)
    Map[# - Block[{n = #, w, len, ww}, w = IntegerDigits[n]; len = Length@ w; ww = Take[w, Ceiling[len/2] ]; If[# < n, #, FromDigits@ Flatten@{#, If[OddQ@ len, Reverse@ Most@ #, Reverse@ #]} &@ If[Last@ ww == 0, MapAt[# - 1 &, Most@ ww, -1]~Join~{9}, MapAt[# - 1 &, ww, -1]]] &@ FromDigits@ Flatten@ {ww, If[OddQ@ len, Reverse@ Most@ ww, Reverse@ ww]}] &, NestList[# + IntegerReverse[#] &, 196, 37]] (* Michael De Vlieger, Jan 22 2020 *)
  • Python
    # Slow Brute-force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=-1
      print(n-m, end=', ')
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331557(n).

Extensions

More terms from Michael De Vlieger, Jan 22 2020

A205601 Goldbach's problem extended to division: number of decompositions of 2n into the floor of unordered ratios of two primes, floor(q/p) = 2n, where p < 2n < q.

Original entry on oeis.org

0, 1, 3, 5, 4, 5, 10, 5, 10, 16, 12, 17, 18, 16, 19, 27, 23, 22, 34, 27, 34, 39, 39, 45, 51, 41, 50, 51, 44, 57, 68, 71, 63, 74, 63, 76, 87, 84, 89, 104, 94, 108, 111, 99, 117, 116, 120, 104, 126, 114, 133, 146, 149, 146, 166, 148, 190, 178, 182, 170, 179, 173
Offset: 1

Author

James D. Klein, Jan 29 2012

Keywords

Examples

			For n = 3, a(n) = 3 because 6 is the floor of 13/2, 19/3, and 31/5. - _T. D. Noe_, Jan 31 2012
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Flatten[Table[Select[2*n*p + Range[p - 1], PrimeQ], {p, Prime[Range[PrimePi[2*n - 1]]]}]]], {n, 62}] (* T. D. Noe, Jan 31 2012 *)
  • PARI
    a(n)=n*=2;my(s,t);forprime(p=2,n-1,t=n*p;while(n==(t=nextprime(t+1))\p,s++));s \\ Charles R Greathouse IV, Jan 30 2012

Extensions

a(21)-a(62) from Charles R Greathouse IV, Jan 31 2012

A202472 Goldbach's Problem extended to subtraction: number of decompositions of 2n into unordered differences of two primes, p, q, where p < 2n < q.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 3, 3, 3, 2, 6, 4, 3, 6, 3, 4, 6, 4, 5, 8, 4, 4, 7, 6, 4, 9, 8, 4, 11, 5, 5, 11, 6, 8, 9, 4, 7, 11, 7, 4, 13, 7, 5, 15, 7, 8, 13, 8, 9, 11, 7, 7, 13, 10, 5, 13, 7, 7, 19, 9, 8, 17, 9, 10, 16, 9, 9, 15, 12, 7, 19, 9, 7, 19, 9, 12, 17, 8, 14
Offset: 1

Author

James D. Klein, Dec 19 2011

Keywords

Crossrefs

Extension of A002375.
Bisection of A092953.

Programs

  • Mathematica
    Table[Length[Select[Prime[Range[PrimePi[2*n]]], PrimeQ[2*n + #] &]], {n, 100}] (* T. D. Noe, Apr 16 2013 *)
  • PARI
    a(n)=my(s);forprime(p=2,2*n,s+=isprime(2*n+p));s \\ Charles R Greathouse IV, Dec 19 2011
    (C++)
    #include 
    using namespace std;
    int main()
    { int p[25] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
      int count, istart = 2;
      for(int n=1; n<=25; n++)
      {
          if(2*n>p[istart]) istart++;
          count = 0;
          for(int j=1; p[j]<2*n; j++)
            for(int i=istart; p[i]-p[j]<=2*n; i++)
              if(p[i]-p[j]==2*n) count++;
          cout << n << ". " << count << endl;
      }
        return 0;
    } // code for the first 25 integers, James D. Klein, Dec 21 2011

Formula

a(n) = A092953(2*n). - Bill McEachen, May 24 2024

A004140 Number of nonempty labeled simple graphs on nodes chosen from an n-set.

Original entry on oeis.org

0, 1, 4, 17, 112, 1449, 40068, 2350601, 286192512, 71213783665, 35883905263780, 36419649682706465, 74221659280476136240, 303193505953871645562969, 2480118046704094643352358500, 40601989176407026666590990422105, 1329877330167226219547875498464516480
Offset: 0

Keywords

Comments

We are given n labeled points, we choose k (1 <= k <= n) of them and construct a simple (but not necessarily connected) graph on these k nodes in 2^C(k,2) ways.
a(n) is the number of (non-null) subgraphs of the complete graph with n vertices. - Maharshee K. Shah, Sep 08 2024

Examples

			n=2: there are 4 graphs: {o}, {o}, {o o}, {o-o}
......................... 1 .. 2 .. 1 2 .. 1 2
		

Crossrefs

Cf. A006896.

Programs

  • Maple
    a:= n-> add (binomial(n, k)*2^(k*(k-1)/2), k=1..n):
    seq (a(n), n=0..20);  # Alois P. Heinz, Oct 09 2012
  • Mathematica
    nn=20;s=Sum[2^Binomial[n,2]x^n/n!,{n,0,nn}];Range[0,nn]!CoefficientList[ Series[(s-1) Exp[x],{x,0,nn}],x]  (* Geoffrey Critzer, Oct 09 2012 *)
  • PARI
    a(n)=sum(k=1,n,binomial(n,k)*2^((k^2-k)/2))

Formula

a(n) = Sum_{k=1..n} binomial(n, k)*2^(k(k-1)/2).
E.g.f.: exp(x)*(A(x)-1), where A(x) is e.g.f. for A006125. - Geoffrey Critzer, Oct 09 2012
a(n) ~ 2^(n*(n-1)/2). - Vaclav Kotesovec, Nov 15 2014